From: Andre Noll Date: Sun, 22 May 2011 13:22:14 +0000 (+0200) Subject: doxify version.h and git-version.h. X-Git-Tag: v0.4.7~5 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=e4278fbb73908f52f6419b38bd3284f1ba063298;p=paraslash.git doxify version.h and git-version.h. --- 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. */