+tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION)
+tarball_delete := $(addprefix $(tarball_pfx)/,\
+ web versions .changelog_before_cvs .changelog_cvs .gitignore\
+ $(ggo_dir) skencil)
+tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2
+
+# To put more focus on warnings, be less verbose as default
+# Use 'make V=1' to see the full commands
+ifdef V
+ ifeq ("$(origin V)", "command line")
+ BUILD_VERBOSE = $(V)
+ endif
+endif
+ifndef BUILD_VERBOSE
+ BUILD_VERBOSE = 0
+endif
+ifeq ($(BUILD_VERBOSE),1)
+ Q =
+else
+ Q = @
+endif
+
+.PHONY: dep all clean distclean maintainer-clean install man tarball\
+ .FORCE-GIT-VERSION-FILE
+all: dep @executables@ $(man_pages)
+dep: $(deps)
+man: $(man_pages)
+tarball: $(tarball)
+
+GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
+ @./GIT-VERSION-GEN GIT-VERSION-FILE
+-include GIT-VERSION-FILE
+@executables@: GIT-VERSION-FILE
+
+-include $(ggo_dir)/makefile
+
+%_command_list.c: %.cmd
+ @[ -z "$(Q)" ] || echo 'GEN $@'
+ $(Q) ./command_util.sh c < $< >$@
+%_command_list.h: %.cmd
+ @[ -z "$(Q)" ] || echo 'GEN $@'
+ $(Q) ./command_util.sh h < $< >$@
+%_command_list.man: %.cmd
+ @[ -z "$(Q)" ] || echo 'GEN $@'
+ $(Q) ./command_util.sh man < $< > $@
+
+server_command_lists_ch = server_command_list.c afs_command_list.c \
+ server_command_list.h afs_command_list.h
+server_command_lists_man = server_command_list.man afs_command_list.man
+man/man1/para_server.1: para_server $(server_command_lists_man) | $(man_dir)
+ @[ -z "$(Q)" ] || echo 'HELP2MAN $<'
+ $(Q) opts="-h --detailed-help -N `for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \
+ help2man $$opts ./para_server > $@
+
+man/man1/para_audiod.1: para_audiod audiod_command_list.man | $(man_dir)
+ @[ -z "$(Q)" ] || echo 'HELP2MAN $<'
+ $(Q) help2man -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@
+
+man/man1/%.1: % | $(man_dir)
+ @[ -z "$(Q)" ] || echo 'HELP2MAN $<'
+ $(Q) help2man -h --detailed-help -N ./$< > $@
+
+man/html/%.html: man/man1/%.1
+ @[ -z "$(Q)" ] || echo 'MAN2HTML $<'
+ $(Q) mkdir -p man/html
+ $(Q) man2html $< > $@
+
+web/%.man.in.html: man/man1/%.1
+ @[ -z "$(Q)" ] || echo 'MAN2HTML $<'
+ $(Q) mkdir -p man/html
+ $(Q) man2html $< | sed -e '/^<\/BODY>/,$$d' -e '1,/<\/HEAD><BODY>/d' > $@
+
+$(object_dir):
+ mkdir -p $@
+$(man_dir):
+ mkdir -p $@