diff options
-rw-r--r-- | .travis.yml | 7 | ||||
-rw-r--r-- | Makefile.in | 10 | ||||
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | src/map/script.cpp | 1 | ||||
-rw-r--r-- | version.make | 4 |
5 files changed, 18 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index c36c00f..913db19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,7 @@ before_script: script: - mkdir build - cd build + - git init - ../configure --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi6` - make -R -k -j2 - make -R -k -j2 test TESTER='valgrind --error-exitcode=1 --track-fds=yes' @@ -54,7 +55,8 @@ script: ## Do something after the main test script after_script: - make -R -k -j2 format - - git diff --exit-code + - git --git-dir=../.git --work-tree=.. diff --exit-code + - make -R -k -j2 dist ### The rest of the file creates a build matrix ### containing gcc-4.6 through gcc-4.8 and clang-3.1 through clang-3.3 @@ -95,6 +97,9 @@ matrix: # everything that was pushed to master was already on 'test', except # the version change and some doc changes. +# As of the next release, current 'master' will become 'stable' and current +# 'test' will become 'master' (now that 'test' doesn't crash all the time) branches: except: - master + - stable diff --git a/Makefile.in b/Makefile.in index d410120..797d3b8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -155,6 +155,8 @@ endif # even though all the related bugs have already been fixed. $(foreach var,$(filter-out .% MAKE% SUFFIXES,${.VARIABLES}),$(if $(filter default,$(origin ${var})),$(eval ${var} =))) +.SECONDARY: + export PATH:=$(realpath ${SRC_DIR}/tools):${PATH} # bash is needed for 'set -o pipefail' below - I have had real bugs there! @@ -421,17 +423,17 @@ override CPPFLAGS += -I . # this only works from within a git checkout dist/%/version.make: $(MKDIR_FIRST) - git show HEAD:version.make > $@ + git --git-dir=${SRC_DIR}/.git show HEAD:version.make > $@ sed 's/^VERSION_FULL := .*/#&\nVERSION_FULL := ${VERSION_FULL}/' -i $@ sed 's/^VERSION_HASH := .*/#&\nVERSION_HASH := ${VERSION_HASH}/' -i $@ dist/%-src.tar: dist/%/version.make - git archive --prefix=$*/ -o $@ HEAD - ( cd dist && tar uf $*-src.tar --mtime="$$(git log -n1 --pretty=%cd)" --mode=664 --owner=root --group=root $*/version.make ) + git --git-dir=${SRC_DIR}/.git archive --prefix=$*/ -o $@ HEAD + ( cd dist && tar uf $*-src.tar --mtime="$$(git --git-dir=${SRC_DIR}/.git log -n1 --pretty=%cd)" --mode=664 --owner=root --group=root $*/version.make ) rm dist/$*/version.make rmdir dist/$*/ dist/%-attoconf-only.tar: $(MKDIR_FIRST) - git --git-dir=deps/attoconf/.git archive --prefix=$*/deps/attoconf/ HEAD -o $@ + git --git-dir=${SRC_DIR}/deps/attoconf/.git archive --prefix=$*/deps/attoconf/ HEAD -o $@ dist/%-bundled.tar: dist/%-src.tar dist/%-attoconf-only.tar cp dist/$*-src.tar $@ tar Af $@ dist/$*-attoconf-only.tar @@ -9,6 +9,9 @@ it. However, please read the note about server-data below. For user instructions, see: http://wiki.themanaworld.org/index.php/How_to_Develop +Important Note: building from a github-generated tarball does not work! +You must either build from a git checkout or from a 'make dist' tarball. + The rest of this file contains information relevant only to 1. Distributors. diff --git a/src/map/script.cpp b/src/map/script.cpp index 87a4c1c..a088cb8 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -75,6 +75,7 @@ AString mapreg_txt = "save/mapreg.txt"; constexpr std::chrono::milliseconds MAPREG_AUTOSAVE_INTERVAL = std::chrono::seconds(10); Map<ScriptLabel, int> scriptlabel_db; +static std::set<ScriptLabel> probable_labels; UPMap<RString, const ScriptBuffer> userfunc_db; diff --git a/version.make b/version.make index 8df7143..7ceea82 100644 --- a/version.make +++ b/version.make @@ -1,5 +1,5 @@ -VERSION_FULL := $(shell cd ${SRC_DIR}; git describe --tags HEAD) -VERSION_HASH := $(shell cd ${SRC_DIR}; git rev-parse HEAD) +VERSION_FULL := $(shell git --git-dir=${SRC_DIR}/.git describe --tags HEAD) +VERSION_HASH := $(shell git --git-dir=${SRC_DIR}/.git rev-parse HEAD) version_bits := $(subst v, ,$(subst -, ,$(subst ., ,${VERSION_FULL}))) VERSION_MAJOR := $(word 1,${version_bits}) |