autocrap := config.h.in configure
tarball_pfx := $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
-tarball_delete := $(addprefix $(tarball_pfx)/,\
- web .changelog_before_cvs .changelog_cvs .gitignore)
+tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
-.PHONY: dep all clean distclean maintainer-clean install man tarball
+.PHONY: dep all clean clean2 distclean maintainer-clean install man tarball
all: dep $(prefixed_executables) $(man_pages)
dep: $(deps)
man: $(man_pages)
%_command_list.h: %.cmd %.c
@[ -z "$(Q)" ] || echo 'GEN $@'
- $(Q) ./command_util.sh h < $< >$@
+ $(Q) ./command_util.bash h < $< >$@
%_command_list.man: %.cmd %.c
@[ -z "$(Q)" ] || echo 'GEN $@'
- $(Q) ./command_util.sh man < $< > $@
+ $(Q) ./command_util.bash man < $< > $@
%_completion.h: %.cmd %.c
@[ -z "$(Q)" ] || echo 'GEN $@'
- $(Q) ./command_util.sh compl $(strip $(call TOUPPER,$(*F)))_COMPLETERS \
+ $(Q) ./command_util.bash compl $(strip $(call TOUPPER,$(*F)))_COMPLETERS \
$(strip $(call TOUPPER,$(*F)))_COMMANDS < $< > $@
server_command_list.h server_command_list.man server_completion.h: command.c
afs_command_list.h afs_command_list.man afs_completion.h: afs.c aft.c attribute.c
audiod_command_list.h audiod_command_list.man audiod_completion.h: audiod_command.c
-server_command_lists_man = server_command_list.man afs_command_list.man
-$(man_dir)/para_server.1: $(help2man_dir)/para_server $(server_command_lists_man) | $(man_dir)
- @[ -z "$(Q)" ] || echo 'MAN $<'
- $(Q) opts="`for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \
- $(HELP2MAN) $$opts ./$< > $@
+server_command_lists := server_command_list.man afs_command_list.man
+audiod_command_lists := audiod_command_list.man
+play_command_lists := play_command_list.man
-$(man_dir)/para_audiod.1: $(help2man_dir)/para_audiod audiod_command_list.man | $(man_dir)
- @[ -z "$(Q)" ] || echo 'MAN $<'
- $(Q) $(HELP2MAN) -N -i audiod_command_list.man ./$< > $@
+$(man_dir)/para_server.1: $(server_command_lists)
+$(man_dir)/para_audiod.1: $(audiod_command_lists)
+$(man_dir)/para_play.1: $(play_command_lists)
-$(man_dir)/para_play.1: $(help2man_dir)/para_play play_command_list.man | $(man_dir)
- @[ -z "$(Q)" ] || echo 'MAN $<'
- $(Q) $(HELP2MAN) -N -i play_command_list.man ./$< > $@
+$(man_dir)/para_server.1: man_util_command_lists := $(server_command_lists)
+$(man_dir)/para_audiod.1: man_util_command_lists := $(audiod_command_lists)
+$(man_dir)/para_play.1: man_util_command_lists := $(play_command_lists)
-$(man_dir)/%.1: $(help2man_dir)/% | $(man_dir)
+$(man_dir)/para_%.1: $(ggo_dir)/%.ggo man_util.bash | $(man_dir) $(help2man_dir)
@[ -z "$(Q)" ] || echo 'MAN $<'
- $(Q) $(HELP2MAN) -N ./$< > $@
+ $(Q) \
+ COMMAND_LISTS="$(man_util_command_lists)" \
+ FILTERS="$(filters)" \
+ GENGETOPT=$(GENGETOPT) \
+ GGO_DIR=$(ggo_dir) \
+ HELP2MAN=$(HELP2MAN) \
+ HELP2MAN_DIR=$(help2man_dir) \
+ RECEIVERS="$(receivers)" \
+ VERSION="$(GIT_VERSION)" \
+ WRITERS="$(writers)" \
+ ./man_util.bash $@
$(hostbin_dir)/error2: error2.c | $(hostbin_dir)
@[ -z "$(Q)" ] || echo 'HCC $<'