From e4278fbb73908f52f6419b38bd3284f1ba063298 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 22 May 2011 15:22:14 +0200 Subject: [PATCH] doxify version.h and git-version.h. --- GIT-VERSION-GEN | 6 ++++-- version.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 15c38794..32802232 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -31,8 +31,10 @@ echo "$VN" [[ -z "$GVF" ]] && exit 0 if [[ -r "$GVF" ]]; then - VC=$(sed -e 's/^#define GIT_VERSION "//; s/"$//' < "$GVF") + pattern='^#define GIT_VERSION "' + VC=$(grep "$pattern" < "$GVF" | sed -e "s/$pattern//; s/\"$//") [[ "$VN" == "$VC" ]] && exit 0 fi echo >&2 "new git version: $VN" -echo "#define GIT_VERSION \"$VN\"" >$GVF +echo "/** \\file ${GVF##*/} Auto-generated version file. Do not edit. */" >$GVF +echo "#define GIT_VERSION \"$VN\"" >> $GVF diff --git a/version.h b/version.h index 3b839669..a9547797 100644 --- a/version.h +++ b/version.h @@ -1,11 +1,13 @@ +/** \file version.h Macros for printing the version string. */ + #include "git-version.h" -/** Version text used by various commands if -V switch was given. */ + +/** Version text printed by all executables if -V 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 .\n" /** Print out \p VERSION_TEXT and exit if version flag was given. */ -- 2.39.2