diff --git a/Makefile.in b/Makefile.in index 0d737a5d..d82c0ea1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -148,7 +148,7 @@ endif ifneq "THIS_IS_NOT_TARBALL" "" # 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) +src/version.cpp: Makefile version.sh $(shell if [ x`cat .version_extra 2> /dev/null` != x`$(srcdir)/version.sh $(GIT) 3>&2 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 diff --git a/version.sh b/version.sh index 22c00c29..aab81116 100755 --- a/version.sh +++ b/version.sh @@ -1,6 +1,6 @@ #!/bin/sh -# When changing this file, remember also about nightlies +# When changing this file, remember also about nightlies (make-tarball.sh) # Get the path to the source directory GIT_DIR=`dirname $0` @@ -11,6 +11,7 @@ if [ "x$GIT" = "x" ] then EXTRA="" else + GIT_HERE="${GIT}" GIT="${GIT} --git-dir=${GIT_DIR}/.git" # Figure out the information we need @@ -38,6 +39,14 @@ else else EXTRA="-git-${COMMITS_SINCE}-${SHORT_ID}" fi + + if [ 1 = `cd ${GIT_DIR}; ${GIT_HERE} status --ignore-submodules=dirty --porcelain -- third_party/Csocket | wc -l` ] + then + # Makefile redirects all errors from this script into /dev/null, but this messages actually needs to be shown + # So put it to 3, and then Makefile redirects 3 to stderr + echo "Warning: Csocket submodule looks outdated. Run: git submodule update --init --recursive" 1>&3 + EXTRA="${EXTRA}-frankenznc" + fi fi # Generate output file, if any