ggo: Move options from makefile to .m4 files.
authorAndre Noll <maan@systemlinux.org>
Sun, 29 Jul 2012 15:13:10 +0000 (17:13 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 27 Aug 2012 11:01:07 +0000 (13:01 +0200)
It's easier to specify these options for gengetopt in the
corresponding m4 files, together with the command line
options of the program.

m4/gengetopt/afh.m4
m4/gengetopt/audioc.m4
m4/gengetopt/audiod.m4
m4/gengetopt/client.m4
m4/gengetopt/filter.m4
m4/gengetopt/makefile
m4/gengetopt/recv.m4
m4/gengetopt/write.m4

index ba7d790114f9138282e39336bf43446eb3cac46b..1cb44931fb89a6a6ae5e0ed8f9ad5cc9b0e2eec6 100644 (file)
@@ -1,3 +1,5 @@
+args "--unamed-opts=audio_file"
+
 include(header.m4)
 <qu>
 text "
 include(header.m4)
 <qu>
 text "
index 5ecc2a92b82b16d90056c361c059c9422946dbc3..cb7ab03ed258f74f88c8fc70083fb25662ab1a1f 100644 (file)
@@ -1,3 +1,5 @@
+args "--unamed-opts=command"
+
 include(header.m4)
 <qu>
 option "socket" s
 include(header.m4)
 <qu>
 option "socket" s
index 9aabd575b0519cc5f763219e135c3726c6e38611..f20bd105144fb54a00c4567acde86dc2075c1e81 100644 (file)
@@ -1,3 +1,5 @@
+args "--no-handle-help"
+
 include(header.m4)
 define(CURRENT_PROGRAM,para_audiod)
 define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf)
 include(header.m4)
 define(CURRENT_PROGRAM,para_audiod)
 define(DEFAULT_CONFIG_FILE,~/.paraslash/audiod.conf)
index 8ade508985e6012a0b67414f3792a213caca7945..6b589dc7c46b88ff7879af9c522e92af6b4bef88 100644 (file)
@@ -1,9 +1,10 @@
+args "--unamed-opts=command --no-handle-error"
+
 include(header.m4)
 define(CURRENT_PROGRAM,para_client)
 define(DEFAULT_CONFIG_FILE,~/.paraslash/client.conf)
 define(DEFAULT_HISTORY_FILE,~/.paraslash/client.history)
 <qu>
 include(header.m4)
 define(CURRENT_PROGRAM,para_client)
 define(DEFAULT_CONFIG_FILE,~/.paraslash/client.conf)
 define(DEFAULT_HISTORY_FILE,~/.paraslash/client.history)
 <qu>
-args "--no-handle-error"
 option "hostname" i "ip or host to connect" string typestr="host" default="localhost" optional
 option "user" u "paraslash username" string typestr="username" default="<current user>" optional
 option "server_port" p "port to connect" int typestr="port" default="2990" optional
 option "hostname" i "ip or host to connect" string typestr="host" default="localhost" optional
 option "user" u "paraslash username" string typestr="username" default="<current user>" optional
 option "server_port" p "port to connect" int typestr="port" default="2990" optional
index 9df0f3f2c9c7abde867f9438f76f36b002e13e7b..f2efbc445c3eb92d1620a361163d193f06acfef1 100644 (file)
@@ -1,3 +1,5 @@
+args "--no-handle-help"
+
 include(header.m4)
 include(loglevel.m4)
 <qu>
 include(header.m4)
 include(loglevel.m4)
 <qu>
index a887ab764203477e33056a395400623a23529693..e1324115048f2c68ffdb6c929f27290973e8ea83 100644 (file)
@@ -27,9 +27,6 @@ $(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_
                --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
 
 define ggo-opts
                --func-name $(subst _write.ggo,,$(<F))_cmdline_parser < $<
 
 define ggo-opts
-$(if $(filter recv filter write audiod,$(*F)), --no-handle-help) \
-$(if $(filter afh,$(*F)), --unamed-opts=audio_file) \
-$(if $(filter client audioc,$(*F)), --unamed-opts=command) \
 --conf-parser \
 --output-dir=$(cmdline_dir) \
 --no-handle-version \
 --conf-parser \
 --output-dir=$(cmdline_dir) \
 --no-handle-version \
index 9702e12b466dada94e78eb524657e74c46c9f5f5..7bc7c106c2288ba99d88c44157d5d79daa4f8bb8 100644 (file)
@@ -1,3 +1,5 @@
+args "--no-handle-help"
+
 include(header.m4)
 include(loglevel.m4)
 
 include(header.m4)
 include(loglevel.m4)
 
index 524d72484a7757000a320934e56b2d1ff1ce49d9..325ce58d906b798595f53727c1d0d56ddaf1bee0 100644 (file)
@@ -1,3 +1,5 @@
+args "--no-handle-help"
+
 include(header.m4)
 include(loglevel.m4)
 
 include(header.m4)
 include(loglevel.m4)