get rid of versiontag file in favour of VERSIONTAG variable

Signed-off-by: Thomas Bernard <miniupnp@free.fr>
This commit is contained in:
Thomas Bernard
2018-07-07 12:36:47 +02:00
parent b141ed6f90
commit 1910637d91
2 changed files with 14 additions and 20 deletions

View File

@@ -6,8 +6,9 @@ SED = sed
API ?= sdl
VERSIONTAG = ../obj/win32-$(API)/versiontag
VERSION := $(shell cat $(VERSIONTAG))
GIT_REVISION := $(shell cat ../src/version.c | cut -f 2 -d '"')
LABEL := $(shell cat ../src/pversion.c | cut -f 2 -d '"')
VERSION := $(subst wip.,wip,$(LABEL).$(GIT_REVISION))
SOURCES = ../src-$(VERSION).tgz
INSTALLER = grafx2-$(API)-$(VERSION).win32.exe
@@ -17,9 +18,5 @@ all: $(INSTALLER)
$(INSTALLER): WinInstaller.nsi $(SOURCES) $(VERSIONTAG)
$(SED) -e 's/VERSION .*/VERSION $(VERSION)/' -e 's/API .*/API $(API)/' $< | $(MAKENSIS) -
$(SOURCES): ../grafx2-$(VERSION)-win32.zip
cd .. && $(UNZIP) grafx2-$(VERSION)-win32.zip src-$(VERSION).tgz
touch $@
../grafx2-$(VERSION)-win32.zip: $(VERSIONTAG)
cd ../src && WIN32CROSS=1 $(MAKE) ziprelease
$(SOURCES): $(wildcard ../src/*.c) $(wildcard ../src/*.h)
cd ../src && WIN32CROSS=1 $(MAKE) $(SOURCES)