]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - version.h
Fix git-version file creation.
[paraslash.git] / version.h
diff --git a/version.h b/version.h
new file mode 100644 (file)
index 0000000..3b83966
--- /dev/null
+++ b/version.h
@@ -0,0 +1,17 @@
+#include "git-version.h"
+/** Version text used by various commands if -V switch was given. */
+#define VERSION_TEXT(prefix) "para_" prefix " " PACKAGE_VERSION \
+       " (" GIT_VERSION ": " CODENAME ")" "\n" \
+       "Copyright (C) 2011 Andre Noll\n" \
+       "This is free software with ABSOLUTELY NO WARRANTY." \
+       " See COPYING for details.\n" \
+       "Written by Andre Noll.\n" \
+       "Report bugs to <maan@systemlinux.org>.\n"
+
+/** Print out \p VERSION_TEXT and exit if version flag was given. */
+#define HANDLE_VERSION_FLAG(_prefix, _args_info_struct) \
+       if (_args_info_struct.version_given) { \
+               printf("%s", VERSION_TEXT(_prefix)); \
+               exit(EXIT_SUCCESS); \
+       }
+