Fix for gitinfo (resolves bug 399).
authorMorgan Deters <mdeters@cs.nyu.edu>
Mon, 18 Feb 2013 16:04:43 +0000 (11:04 -0500)
committerMorgan Deters <mdeters@cs.nyu.edu>
Mon, 18 Feb 2013 16:04:43 +0000 (11:04 -0500)
src/Makefile.am

index 9da50bac587004046cbc712520750b95878a6d3f..c9f928ba821dd44e5dc2828a09f8e38db315c26b 100644 (file)
@@ -117,11 +117,11 @@ git_versioninfo.cpp: gitinfo
            isgit=true; \
            branch=`head -1 gitinfo`; \
            rev=`head -2 gitinfo | tail -1 | awk '{print$$1}'`; \
-           mods=`grep '^Modifications: ' gitinfo | awk '{print$$2}'`; \
+           mods=`grep '^Modifications: ' gitinfo | awk '{print$$2} END { if(!NR) print "false" }'`; \
          else \
            isgit=false; \
            branch=unknown; \
-           rev=0; \
+           rev=unknown; \
            mods=false; \
          fi; \
          echo "#include \"util/configuration.h\""; \