Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: znc/znc
base: 3a7dc7aa73ac
...
head fork: znc/znc
compare: bbde9ab464cf
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 19 additions and 5 deletions.
  1. +4 −2 Makefile.in
  2. +15 −3 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
18 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`
@@ -16,11 +18,21 @@ else
COMMITS_SINCE=`${GIT} log --format=oneline ${LATEST_TAG}..HEAD | wc -l`
SHORT_ID=`${GIT} rev-parse --short HEAD`
- # If this commit is tagged, don't print anything
- # (the assumption here is: this is a release)
if [ "x$COMMITS_SINCE" = "x0" ]
then
- EXTRA=""
+ if [ "x$LATEST_TAG" = "x" ]
+ then
+ if [ "x$SHORT_ID" = "x" ]
+ then
+ EXTRA=""
+ else
+ EXTRA="-git-${SHORT_ID}"
+ fi
+ else
+ # If this commit is tagged, don't print anything
+ # (the assumption here is: this is a release)
+ EXTRA=""
+ fi
else
EXTRA="-git-${COMMITS_SINCE}-${SHORT_ID}"
fi

No commit comments for this range

Something went wrong with that request. Please try again.