From 4fb14523c8b152c74a8f149197e66e773071337b Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Fri, 20 Mar 2009 14:29:18 -0700 Subject: [PATCH] Clean up release builder scripts. The version.h file is generated by the Makefile, we should prefill the version_tag.h file. (cherry picked from commit 4205752bb0df2bc88978cddd27d4d8981352e733) --- scripts/MAKE_RELEASE.sh | 6 ++++-- scripts/MAKE_SNAPSHOT.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/MAKE_RELEASE.sh b/scripts/MAKE_RELEASE.sh index 7d0a85950..2aa76447e 100644 --- a/scripts/MAKE_RELEASE.sh +++ b/scripts/MAKE_RELEASE.sh @@ -47,9 +47,11 @@ fi echo "Exporting $tag to $destdir/$prefix..." git archive --prefix="$prefix/" $tag | ( cd "$destdir" && tar xf - ) -versionh="$destdir/$prefix/version.h" +versionh="$destdir/$prefix/version_tag.h" echo "Create $versionh ..." -echo "#define VERSION_TAG \"$tag\"" > $versionh +echo "#ifndef VERSION_TAG" > $versionh +echo "#define VERSION_TAG \"$tag\"" >> $versionh +echo "#endif" >> $versionh echo "Running autoconf.sh..." ( cd $destdir/$prefix && sh autoconf.sh ) diff --git a/scripts/MAKE_SNAPSHOT.sh b/scripts/MAKE_SNAPSHOT.sh index cb26bc9ca..d54fdc954 100644 --- a/scripts/MAKE_SNAPSHOT.sh +++ b/scripts/MAKE_SNAPSHOT.sh @@ -47,9 +47,11 @@ fi echo "Exporting $tag to $destdir/$prefix..." git archive --prefix="$prefix/" $tag | ( cd "$destdir" && tar xf - ) -versionh="$destdir/$prefix/version.h" +versionh="$destdir/$prefix/version_tag.h" echo "Create $versionh ..." -echo "#define VERSION_TAG \"$tag\"" > $versionh +echo "#ifndef VERSION_TAG" > $versionh +echo "#define VERSION_TAG \"$tag\"" >> $versionh +echo "#endif" >> $versionh echo "Running autoconf.sh..." ( cd $destdir/$prefix && sh autoconf.sh )