Commit 8df585e8 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix bugs with gitversion.h

parent 889cb7b8
GITVERSION_FILE=gitversion.h GITVERSION_FILE=gitversion.h
GITVERSION_FILE_TMP=gitversion.h.tmp GITVERSION_FILE_TMP=gitversion.h.tmp
ECHO=/bin/echo
ANDROID_SRC_FILES= \ ANDROID_SRC_FILES= \
msandroid.cpp \ msandroid.cpp \
android-display.c \ android-display.c \
...@@ -252,15 +254,15 @@ img_DATA=nowebcamCIF.jpg ...@@ -252,15 +254,15 @@ img_DATA=nowebcamCIF.jpg
make_gitversion_h: make_gitversion_h:
if test -d $(top_srcdir)/.git ; then \ if test -d $(top_srcdir)/.git ; then \
echo -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\ $(ECHO) -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
echo \"`git describe`\" >> $(GITVERSION_FILE_TMP) &&\ $(ECHO) \"`cd $(top_srcdir) && git describe`\" >> $(GITVERSION_FILE_TMP) &&\
if test "`cat $(GITVERSION_FILE_TMP)`" != "`cat $(srcdir)/$(GITVERSION_FILE)`" ; then \ if test "`cat $(GITVERSION_FILE_TMP)`" != "`cat $(srcdir)/$(GITVERSION_FILE)`" ; then \
cp -f $(GITVERSION_FILE_TMP) $(srcdir)/$(GITVERSION_FILE) ; \ cp -f $(GITVERSION_FILE_TMP) $(srcdir)/$(GITVERSION_FILE) ; \
fi \ fi \
&& rm -f $(GITVERSION_FILE_TMP) ;\ && rm -f $(GITVERSION_FILE_TMP) ;\
fi fi
if ! test -f $(GITVERSION_FILE) ; then \ if ! test -f $(GITVERSION_FILE) ; then \
echo -n "#define GIT_VERSION \"unknown\" " > $(GITVERSION_FILE) ;\ $(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(GITVERSION_FILE) ;\
fi fi
$(GITVERSION_FILE): make_gitversion_h $(GITVERSION_FILE): make_gitversion_h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment