Merge branch 't/fade_improvements'
[paraslash.git] / m4 / gengetopt / makefile
index cc5835c..c81eda4 100644 (file)
@@ -1,45 +1,15 @@
-module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
-
-$(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(module_ggo_opts) \
-               --output-dir=$(cmdline_dir) \
-               --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 < $<
-
-$(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(module_ggo_opts) \
-               --output-dir=$(cmdline_dir) \
-               --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 < $<
-$(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo | $(cmdline_dir)
-       @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(module_ggo_opts) \
-               --output-dir=$(cmdline_dir) \
-               --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 < $<
-
-define ggo-opts
---conf-parser \
---output-dir=$(cmdline_dir) \
---no-handle-version \
---file-name=$(*F).cmdline \
---func-name=$(*F)_cmdline_parser \
---arg-struct-name=$(*F)_args_info \
---set-package="para_$(*F)" \
---set-version="$(PACKAGE_VERSION)"
+define ggo_opts
+       --output-dir=$(cmdline_dir) \
+       --set-version="$(PACKAGE_VERSION)" \
+       --arg-struct-name=$(*F)_args_info \
+       --file-name=$(*F).cmdline \
+       --func-name=$(*F)_cmdline_parser \
+       --set-package="para_$(*F)"
 endef
 
 $(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
        @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) $(GENGETOPT) $(ggo-opts) < $<
+       $(Q) $(GENGETOPT) $(ggo_opts) < $<
 
 $(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
        $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/color.m4 \
@@ -63,6 +33,7 @@ $(ggo_dir)/client.ggo: \
        $(m4_ggo_dir)/config_file.m4 \
        $(m4_ggo_dir)/history_file.m4 \
        $(m4_ggo_dir)/complete.m4
+$(ggo_dir)/fade.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4
 
 $(ggo_dir)/%.ggo: $(m4_ggo_dir)/%.m4 $(m4_ggo_dir)/header.m4 | $(ggo_dir)
        @[ -z "$(Q)" ] || echo 'M4 $<'