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

fix bugs with gitversion.h

parent 889cb7b8
GITVERSION_FILE=gitversion.h
GITVERSION_FILE_TMP=gitversion.h.tmp
ECHO=/bin/echo
ANDROID_SRC_FILES= \
msandroid.cpp \
android-display.c \
......@@ -252,15 +254,15 @@ img_DATA=nowebcamCIF.jpg
make_gitversion_h:
if test -d $(top_srcdir)/.git ; then \
echo -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
echo \"`git describe`\" >> $(GITVERSION_FILE_TMP) &&\
$(ECHO) -n "#define GIT_VERSION " > $(GITVERSION_FILE_TMP) &&\
$(ECHO) \"`cd $(top_srcdir) && git describe`\" >> $(GITVERSION_FILE_TMP) &&\
if test "`cat $(GITVERSION_FILE_TMP)`" != "`cat $(srcdir)/$(GITVERSION_FILE)`" ; then \
cp -f $(GITVERSION_FILE_TMP) $(srcdir)/$(GITVERSION_FILE) ; \
fi \
&& rm -f $(GITVERSION_FILE_TMP) ;\
fi
if ! test -f $(GITVERSION_FILE) ; then \
echo -n "#define GIT_VERSION \"unknown\" " > $(GITVERSION_FILE) ;\
$(ECHO) -n "#define GIT_VERSION \"unknown\" " > $(GITVERSION_FILE) ;\
fi
$(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