const char **p = d? audiod_args_info_detailed_help
: audiod_args_info_help;
- printf_or_die("%s\n\n", AUDIOD_CMDLINE_PARSER_PACKAGE "-"
- AUDIOD_CMDLINE_PARSER_VERSION);
+ printf_or_die("%s\n\n", VERSION_SINGLE_LINE("audiod"));
printf_or_die("%s\n\n", audiod_args_info_usage);
for (; *p; p++)
printf_or_die("%s\n", *p);
const char **p = d? filter_args_info_detailed_help
: filter_args_info_help;
- printf_or_die("%s\n\n", FILTER_CMDLINE_PARSER_PACKAGE "-"
- FILTER_CMDLINE_PARSER_VERSION);
+ printf_or_die("%s\n\n", VERSION_SINGLE_LINE("filter"));
printf_or_die("%s\n\n", filter_args_info_usage);
for (; *p; p++)
printf_or_die("%s\n", *p);
define ggo_opts
--output-dir=$(cmdline_dir) \
- --set-version="$(PACKAGE_VERSION)" \
+ --set-version="$(GIT_VERSION) ($(codename))" \
--arg-struct-name=$(*F)_args_info \
--file-name=$(*F).cmdline \
--func-name=$(*F)_cmdline_parser \
.PRECIOUS: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h $(ggo_dir)/%.ggo
-$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
+$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo git-version.h | $(cmdline_dir)
@[ -z "$(Q)" ] || echo 'GGO $<'
$(Q) $(GENGETOPT) $(ggo_opts) < $<
const char **p = d? play_args_info_detailed_help
: play_args_info_help;
-// printf_or_die("%s\n\n", PLAY_CMDLINE_PARSER_PACKAGE "-"
-// PLAY_CMDLINE_PARSER_VERSION);
-
+ printf_or_die("%s\n\n", VERSION_SINGLE_LINE("play"));
printf_or_die("%s\n\n", play_args_info_usage);
if (d)
printf_or_die("%s\n", PP_DESC);
const char **p = d? recv_args_info_detailed_help
: recv_args_info_help;
- printf_or_die("%s\n\n", RECV_CMDLINE_PARSER_PACKAGE "-"
- RECV_CMDLINE_PARSER_VERSION);
+ printf_or_die("%s\n\n", VERSION_SINGLE_LINE("recv"));
printf_or_die("%s\n\n", recv_args_info_usage);
for (; *p; p++)
printf_or_die("%s\n", *p);
#include "git-version.h"
+#define VERSION_SINGLE_LINE(prefix) "para_" prefix \
+ " " GIT_VERSION " (" CODENAME ")"
+
/** Version text printed by all executables if -V was given. */
-#define VERSION_TEXT(prefix) "para_" prefix " " PACKAGE_VERSION \
- " (" GIT_VERSION ": " CODENAME ")" "\n" \
+#define VERSION_TEXT(prefix) VERSION_SINGLE_LINE(prefix) "\n" \
"Copyright (C) 2013 Andre Noll\n" \
"This is free software with ABSOLUTELY NO WARRANTY." \
" See COPYING for details.\n" \
const char **p = d? write_args_info_detailed_help
: write_args_info_help;
- printf_or_die("%s\n\n", WRITE_CMDLINE_PARSER_PACKAGE "-"
- WRITE_CMDLINE_PARSER_VERSION);
+ printf_or_die("%s\n\n", VERSION_SINGLE_LINE("write"));
printf_or_die("%s\n\n", write_args_info_usage);
for (; *p; p++)
printf_or_die("%s\n", *p);