Permalink
Browse files

Quieten gitversion generation

Don't output anything unless there's an error, and
use automake's silent build rules
  • Loading branch information...
1 parent 3a4a4b9 commit 187fd01efdcffab034910b7d6d436f87f662c3aa @thaytan thaytan committed Apr 23, 2012
Showing with 7 additions and 7 deletions.
  1. +1 −1 src/Makefile.am
  2. +6 −6 tools/gitversion.sh.in
View
@@ -79,7 +79,7 @@ include src/slicer/Makefile.am
repsnapper_SOURCES = $(SHARED_SRC) $(SHARED_INC) src/repsnapper.cpp
src/gitversion.h: FORCE
- sh $(top_builddir)/tools/gitversion.sh $(top_builddir)/src/gitversion.h $(top_srcdir)/src/gitversion.h
+ $(AM_V_GEN)sh $(top_builddir)/tools/gitversion.sh $(top_builddir)/src/gitversion.h $(top_srcdir)/src/gitversion.h
FORCE:
built_header_make=src/gitversion.h
View
@@ -16,8 +16,8 @@ if [ ! -d "${TOPSRCDIR}/.git" ]; then
echo "Warning: Not building from git and ${TARBALL_VERSION_H} doesn't exist"
echo const string GIT_COMMIT=\"Unknown\"\; > $VERSION_H
echo const string GIT_COMMIT_DATE=\"Unknown\"\; >> $VERSION_H
- else
- echo "Not updating ${VERSION_H} - building from tarball"
+ # else
+ # echo "Not updating ${VERSION_H} - building from tarball"
fi
exit 0
fi
@@ -42,10 +42,10 @@ if [ -e $VERSION_H ]; then
OLDCOMMIT=`$AWK -v FS="$FSEQUAL" '/const string GIT_COMMIT=/{print $2}' $VERSION_H`
fi
-if [ "x\"$COMMIT\";" = "x$OLDCOMMIT" ]; then
- echo "Commit has not changed"
-else
- echo "Updating commit"
+if [ "x\"$COMMIT\";" != "x$OLDCOMMIT" ]; then
+ # echo "Updating commit"
echo const string GIT_COMMIT=\"$COMMIT\"\; > $VERSION_H
echo const string GIT_COMMIT_DATE=\"$DATE\"\; >> $VERSION_H
+#else
+ # echo "Commit has not changed"
fi

0 comments on commit 187fd01

Please sign in to comment.