mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-15 13:35:53 +01:00
util: improve the command line argument parsing in wmmenugen
The code ignored the last argument provided on the command line; It did not support the recommended '--version' and '--help' from GNU which are often handy; It used an unusual syntax to specify the parser, now it can also use more usual "-parser=name" and "-parser name", the old syntax is still supported to avoid breaking compatibility; When a problem is found with an argument, the program stops instead of printing an error message and continuing; There's been updates on the exit codes in case of problem because it is an information that could be useful for people calling the program from a script; Took the opportunity to provide more information in the man page and to get it cross-checked against the program's option list during "make check". Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
8088dc1eab
commit
0a009143c3
@@ -49,7 +49,7 @@ am__v_CHKOPTS_0 = @echo " CHK $@" ;
|
||||
am__v_CHKOPTS_1 =
|
||||
|
||||
check-local: wmaker-args WPrefs-args wmagnify-args geticonset-args getstyle-args seticons-args setstyle-args \
|
||||
wdread-args wdwrite-args wmgenmenu-args wmsetbg-args wxcopy-args wxpaste-args
|
||||
wdread-args wdwrite-args wmgenmenu-args wmmenugen-args wmsetbg-args wxcopy-args wxpaste-args
|
||||
|
||||
wmaker-args:
|
||||
$(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
|
||||
@@ -91,6 +91,10 @@ wmgenmenu-args:
|
||||
$(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
|
||||
--program "$(top_builddir)/util/wmgenmenu" --man-page "$(top_srcdir)/doc/wmgenmenu.1"
|
||||
|
||||
wmmenugen-args:
|
||||
$(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
|
||||
--program "$(top_builddir)/util/wmmenugen" --man-page "$(top_srcdir)/doc/wmmenugen.1"
|
||||
|
||||
wmsetbg-args:
|
||||
$(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
|
||||
--program "$(top_builddir)/util/wmsetbg" --man-page "wmsetbg.1"
|
||||
@@ -104,4 +108,4 @@ wxpaste-args:
|
||||
--program "$(top_builddir)/util/wxpaste" --man-page "$(top_srcdir)/doc/wxpaste.1"
|
||||
|
||||
.PHONY: wmaker-args WPrefs-args wmagnify-args geticonset-args getstyle-args seticons-args setstyle-args \
|
||||
wdread-args wdwrite-args wmgenmenu-args wmsetbg-args wxcopy-args wxpaste-args
|
||||
wdread-args wdwrite-args wmgenmenu-args wmmenugen-args wmsetbg-args wxcopy-args wxpaste-args
|
||||
|
||||
Reference in New Issue
Block a user