summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-03 08:41:41 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-04 16:50:30 -0700
commitd53f69d2249120b366b15a2333110372d67fbb5b (patch)
treeec27647907a126e58563828a2ff664c6423a2093
parent5586980e438bc52bf0e5f6c7b662d36d95b48f17 (diff)
downloadtmwa-d53f69d2249120b366b15a2333110372d67fbb5b.tar.gz
tmwa-d53f69d2249120b366b15a2333110372d67fbb5b.tar.bz2
tmwa-d53f69d2249120b366b15a2333110372d67fbb5b.tar.xz
tmwa-d53f69d2249120b366b15a2333110372d67fbb5b.zip
Fix travis
-rw-r--r--.travis.yml7
-rw-r--r--Makefile.in10
-rw-r--r--README3
-rw-r--r--src/map/script.cpp1
-rw-r--r--version.make4
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
diff --git a/README b/README
index 7a6edfc..9f29971 100644
--- a/README
+++ b/README
@@ -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})