summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-25 23:42:10 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-25 23:42:10 +0100
commit0b0dc6a731b50447ac2045b3897f8eaa9a0d2b10 (patch)
tree62516bc6ce599fce7c485ba7c802bb1cc7be21e4 /crawl-ref/source/makefile
parenta410ea842acb2c40616acc1f8e50b832bebdbf90 (diff)
downloadcrawl-ref-0b0dc6a731b50447ac2045b3897f8eaa9a0d2b10.tar.gz
crawl-ref-0b0dc6a731b50447ac2045b3897f8eaa9a0d2b10.zip
Properly build when out of git (using packaged source).
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 1a2364bca8..1a5b07bb61 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -720,7 +720,7 @@ EXTRA_OBJECTS += version.o
LIBS += $(CONTRIB_LIBS) $(EXTRA_LIBS)
GAME_DEPENDS := $(DESTTILEFILES) $(OBJECTS) $(EXTRA_OBJECTS) $(CONTRIB_LIBS)
SRC_PKG_BASE := stone_soup
-SRC_VERSION := $(shell git describe --tags --long)
+SRC_VERSION := $(shell git describe --tags --long 2>/dev/null || cat util/release_ver)
PKG_SRC_DIR := $(SRC_PKG_BASE)-$(SRC_VERSION)
SRC_PKG_TAR := $(PKG_SRC_DIR).tar.bz2
SRC_PKG_ZIP := $(PKG_SRC_DIR).zip
@@ -956,6 +956,7 @@ clean-rltiles:
# To package, you *must* have lex and yacc to generate the intermediates.
BSRC = build/crawl-ref/source/
package-source: prebuildyacc depend removeold
+ @git branch >/dev/null 2>/dev/null || (echo You can package source only from git. && false)
rm -rf build
mkdir build
(cd ../..;git ls-files| \
@@ -969,6 +970,9 @@ package-source: prebuildyacc depend removeold
tar xf - -C $(BSRC)contrib/$$x; \
done
find build -name .gitignore -execdir rm -f '{}' +
+ (git describe --tags --long $(MERGE_BASE) 2> /dev/null || \
+ git describe --tags $(MERGE_BASE) 2> /dev/null) \
+ > $(BSRC)util/release_ver
cd build && mv crawl-ref $(PKG_SRC_DIR)
cd build && tar cfj ../../../$(SRC_PKG_TAR) $(PKG_SRC_DIR)
cd build && zip -rq ../../../$(SRC_PKG_ZIP) $(PKG_SRC_DIR)