Skip to content
Browse files

Fix git version in nightlies

  • Loading branch information...
1 parent 10b4890 commit bbde9ab464cfbc1760f640666f29084a6c2ba2cd @DarthGandalf DarthGandalf committed Apr 1, 2013
Showing with 6 additions and 2 deletions.
  1. +4 −2 Makefile.in
  2. +2 −0 version.sh
View
6 Makefile.in
@@ -101,12 +101,14 @@ src/%.o: src/%.cpp Makefile
$(E) Building core object $*...
$(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MD -MF .depend/$*.dep -MT $@
-# If git-describe differs from .version_extra, add a phony target to dependencies, forcing version.o to be recompiled
-# znc-0.200-430-g80acaa7 -> -DVERSION_EXTRA="\"-git-430-80acaa7\""
+ifneq "THIS_IS_NOT_NIGHTLY" ""
+# If git commit was changed since previous build, add a phony target to dependencies, forcing version.o to be recompiled
+# Nightlies have pregenerated version.cpp
src/version.cpp: Makefile version.sh $(shell if [ x`cat .version_extra 2> /dev/null` != x`$(srcdir)/version.sh $(GIT) 2> /dev/null` ]; then echo version_extra_recompile; fi)
@mkdir -p .depend src
$(E) Building source file version.cpp...
$(Q)WRITE_OUTPUT=yes $(srcdir)/version.sh "$(GIT)" > .version_extra 2> /dev/null
+endif
install: znc $(LIBZNC)
test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
View
2 version.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+# When changing this file, remember also about nightlies
+
# Get the path to the source directory
GIT_DIR=`dirname $0`

0 comments on commit bbde9ab

Please sign in to comment.
Something went wrong with that request. Please try again.