From 706633ec598a0670da6f61bc6b33e5dc2ecca19c Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Wed, 22 Jan 2014 19:32:25 -0800 Subject: [PATCH] make: VERSION variable can be set either via git or the VERSION file Change up the shell line so that it can fallback on the VERSION file if building without a Git repository (eg, from a release tarball). Additionally, change the titlepic generation so that it uses this single instance of setting VERSION rather than doing its own thing. --- Makefile | 4 ++-- graphics/titlepic/create_caption | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 10c1b448..371caa0c 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=$(shell git describe) +VERSION=$(shell git describe 2>/dev/null || cat VERSION) WADS=wads CPP=scripts/simplecpp DEUTEX=deutex @@ -44,7 +44,7 @@ all: $(OBJS) subdirs: $(MAKE) -C graphics/text - $(MAKE) -C graphics/titlepic + $(MAKE) VERSION=$(VERSION) -C graphics/titlepic $(MAKE) -C lumps/cph/misc-lumps $(MAKE) -C lumps/genmidi $(MAKE) -C lumps/dmxgus diff --git a/graphics/titlepic/create_caption b/graphics/titlepic/create_caption index 66a9de9c..10b976a0 100755 --- a/graphics/titlepic/create_caption +++ b/graphics/titlepic/create_caption @@ -1,7 +1,5 @@ #!/bin/sh -VERSION=`git describe` || VERSION=`cat ../../VERSION` - convert titlepic.gif -fill white -font Helvetica-Bold \ -draw "image over 94,2 0,0 '$1'" \ -pointsize 20 \