VARDIR := /var/paraslash
PKGDATADIR := @datarootdir@/@PACKAGE_NAME@
MANDIR := @datarootdir@/man/man1
-
+PACKAGE_VERSION := @PACKAGE_VERSION@
+PACKAGE_STRING := @PACKAGE_STRING@
install_sh := @install_sh@
build_date := $(shell date)
gengetopts_c := $(patsubst %/,, $(gengetopts:.ggo=.cmdline.c))
gengetopts_h := $(patsubst %/,, $(gengetopts:.ggo=.cmdline.h))
autocrap := config.h.in configure
-tarball_pfx := @PACKAGE_TARNAME@-@PACKAGE_VERSION@
+tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION)
tarball_delete = web versions pics .changelog_before_cvs .changelog_cvs .gitignore
tarball_delete := $(patsubst %,$(tarball_pfx)/%,$(tarball_delete))
tarball_add := $(gengetopts_c) $(gengetopts_h) $(autocrap)
-tarball := @PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.bz2
+tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2
.PHONY: clean distclean maintainer-clean install man tarball
all: $(BINARIES) $(man_pages)
*.o: para.h config.h gcc-compat.h
include Makefile.deps
-
-module_ggo_opts := --set-version="(@PACKAGE_STRING@, $(codename))"
-
-grab_client.cmdline.h grab_client.cmdline.c: $(ggo_dir)/grab_client.ggo
- gengetopt $(module_ggo_opts) \
- -S \
- --set-package=grab \
- --no-handle-help \
- --no-handle-error \
- --no-handle-version \
- --arg-struct-name=grab_client_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
-
-%_recv.cmdline.h %_recv.cmdline.c: $(ggo_dir)/%_recv.ggo
- gengetopt $(module_ggo_opts) \
- --set-package=$(subst .ggo,,$(<F)) \
- --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
-
-%_filter.cmdline.h %_filter.cmdline.c: $(ggo_dir)/%_filter.ggo
- gengetopt $(module_ggo_opts) \
- --set-package=$(subst .ggo,,$(<F)) \
- --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name $(subst _filter.ggo,,$(<F))_cmdline_parser < $<
-%_write.cmdline.h %_write.cmdline.c: $(ggo_dir)/%_write.ggo
- gengetopt -S $(module_ggo_opts) \
- --set-package=$(subst .ggo,,$(<F)) \
- --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
- --file-name=$(subst .ggo,,$(<F)).cmdline \
- --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
-
-%.cmdline.h %.cmdline.c: $(ggo_dir)/%.ggo
- case $(<F) in client.ggo) O="--unamed-opts=command";; \
- audioc.ggo) O="--unamed-opts=command";; \
- fsck.ggo) O="--unamed-opts=table";; \
- afh.ggo) O="--unamed-opts=audio_file";; \
- recv.ggo) O="--no-handle-help";; \
- filter.ggo) O="--no-handle-help";; \
- write.ggo) O="--no-handle-help";; \
- audiod.ggo) O="--no-handle-help";; \
- esac; \
- if test $(<F) != fsck.ggo; then O="$$O --conf-parser "; fi; \
- gengetopt $$O \
- --no-handle-version \
- --file-name=$(*F).cmdline \
- --func-name $(*F)_cmdline_parser \
- --arg-struct-name=$(*F)_args_info \
- --set-package="para_$(subst .cmdline,,$(*F))" \
- --set-version="@PACKAGE_VERSION@" < $<
+include $(ggo_dir)/Makefile.ggo
%_command_list.c %_command_list.h: %.cmd
./command_util.sh c < $< >$@
$(install_sh) -m 644 $(man_pages) $(MANDIR)
mkdir -p $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain
-@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.bz2: $(tarball_add)
+@PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2: $(tarball_add)
rm -rf $(tarball_pfx).tar.bz2 $(tarball_pfx)
git archive --format=tar --prefix=$(tarball_pfx)/ HEAD \
| tar --delete $(tarball_delete) > $(tarball_pfx).tar
--- /dev/null
+module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
+
+grab_client.cmdline.h grab_client.cmdline.c: $(ggo_dir)/grab_client.ggo
+ gengetopt $(module_ggo_opts) \
+ -S \
+ --set-package=grab \
+ --no-handle-help \
+ --no-handle-error \
+ --no-handle-version \
+ --arg-struct-name=grab_client_args_info \
+ --file-name=$(subst .ggo,,$(<F)).cmdline \
+ --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
+
+%_recv.cmdline.h %_recv.cmdline.c: $(ggo_dir)/%_recv.ggo
+ gengetopt $(module_ggo_opts) \
+ --set-package=$(subst .ggo,,$(<F)) \
+ --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
+ --file-name=$(subst .ggo,,$(<F)).cmdline \
+ --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
+
+%_filter.cmdline.h %_filter.cmdline.c: $(ggo_dir)/%_filter.ggo
+ gengetopt $(module_ggo_opts) \
+ --set-package=$(subst .ggo,,$(<F)) \
+ --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
+ --file-name=$(subst .ggo,,$(<F)).cmdline \
+ --func-name $(subst _filter.ggo,,$(<F))_cmdline_parser < $<
+%_write.cmdline.h %_write.cmdline.c: $(ggo_dir)/%_write.ggo
+ gengetopt -S $(module_ggo_opts) \
+ --set-package=$(subst .ggo,,$(<F)) \
+ --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
+ --file-name=$(subst .ggo,,$(<F)).cmdline \
+ --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
+
+%.cmdline.h %.cmdline.c: $(ggo_dir)/%.ggo
+ case $(<F) in client.ggo) O="--unamed-opts=command";; \
+ audioc.ggo) O="--unamed-opts=command";; \
+ fsck.ggo) O="--unamed-opts=table";; \
+ afh.ggo) O="--unamed-opts=audio_file";; \
+ recv.ggo) O="--no-handle-help";; \
+ filter.ggo) O="--no-handle-help";; \
+ write.ggo) O="--no-handle-help";; \
+ audiod.ggo) O="--no-handle-help";; \
+ esac; \
+ if test $(<F) != fsck.ggo; then O="$$O --conf-parser "; fi; \
+ gengetopt $$O \
+ --no-handle-version \
+ --file-name=$(*F).cmdline \
+ --func-name $(*F)_cmdline_parser \
+ --arg-struct-name=$(*F)_args_info \
+ --set-package="para_$(subst .cmdline,,$(*F))" \
+ --set-version="$(PACKAGE_VERSION)" < $<
+