mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix git version in nightlies
This commit is contained 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)
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user