Don't let make write the filename into the output
[paraslash.git] / ggo / makefile
1 module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
2
3 grab_client.cmdline.h grab_client.cmdline.c: $(ggo_dir)/grab_client.ggo
4 gengetopt $(module_ggo_opts) \
5 -S \
6 --set-package=grab \
7 --no-handle-help \
8 --no-handle-error \
9 --no-handle-version \
10 --arg-struct-name=grab_client_args_info \
11 --file-name=$(subst .ggo,,$(<F)).cmdline \
12 --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
13
14 %_recv.cmdline.h %_recv.cmdline.c: $(ggo_dir)/%_recv.ggo
15 gengetopt $(module_ggo_opts) \
16 --set-package=$(subst .ggo,,$(<F)) \
17 --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
18 --file-name=$(subst .ggo,,$(<F)).cmdline \
19 --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
20
21 %_filter.cmdline.h %_filter.cmdline.c: $(ggo_dir)/%_filter.ggo
22 gengetopt $(module_ggo_opts) \
23 --set-package=$(subst .ggo,,$(<F)) \
24 --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
25 --file-name=$(subst .ggo,,$(<F)).cmdline \
26 --func-name $(subst _filter.ggo,,$(<F))_cmdline_parser < $<
27 %_write.cmdline.h %_write.cmdline.c: $(ggo_dir)/%_write.ggo
28 gengetopt -S $(module_ggo_opts) \
29 --set-package=$(subst .ggo,,$(<F)) \
30 --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
31 --file-name=$(subst .ggo,,$(<F)).cmdline \
32 --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
33
34 %.cmdline.h %.cmdline.c: $(ggo_dir)/%.ggo
35 case $(<F) in client.ggo) O="--unamed-opts=command";; \
36 audioc.ggo) O="--unamed-opts=command";; \
37 fsck.ggo) O="--unamed-opts=table";; \
38 afh.ggo) O="--unamed-opts=audio_file";; \
39 recv.ggo) O="--no-handle-help";; \
40 filter.ggo) O="--no-handle-help";; \
41 write.ggo) O="--no-handle-help";; \
42 audiod.ggo) O="--no-handle-help";; \
43 esac; \
44 if test $(<F) != fsck.ggo; then O="$$O --conf-parser "; fi; \
45 gengetopt $$O \
46 --no-handle-version \
47 --file-name=$(*F).cmdline \
48 --func-name $(*F)_cmdline_parser \
49 --arg-struct-name=$(*F)_args_info \
50 --set-package="para_$(subst .cmdline,,$(*F))" \
51 --set-version="$(PACKAGE_VERSION)" < $<
52
53 $(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
54 $(ggo_dir)/loglevel.m4 $(ggo_dir)/color.m4 \
55 $(ggo_dir)/config_file.m4 $(ggo_dir)/logfile.m4 \
56 $(ggo_dir)/daemon.m4 $(ggo_dir)/user.m4 \
57 $(ggo_dir)/group.m4
58
59 $(ggo_dir)/afh.ggo: $(ggo_dir)/loglevel.m4
60 $(ggo_dir)/audioc.ggo: $(ggo_dir)/loglevel.m4
61 $(ggo_dir)/filter.ggo: $(ggo_dir)/loglevel.m4
62 $(ggo_dir)/fsck.ggo: $(ggo_dir)/loglevel.m4
63 $(ggo_dir)/gui.ggo: $(ggo_dir)/loglevel.m4
64 $(ggo_dir)/recv.ggo: $(ggo_dir)/loglevel.m4
65 $(ggo_dir)/write.ggo: $(ggo_dir)/loglevel.m4
66 $(ggo_dir)/client.ggo: $(ggo_dir)/loglevel.m4 $(ggo_dir)/config_file.m4
67
68 $(ggo_dir)/%.ggo: $(ggo_dir)/%.m4 $(ggo_dir)/header.m4
69 cd $(ggo_dir); m4 $(<F) > $(@F)