changeset 67:e2415dd9b6b1

Improve build system.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 21 Aug 2017 15:43:53 +0300
parents 6ee701e2d8d9
children aa06f72f6557
files Makefile
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Aug 21 15:15:23 2017 +0300
+++ b/Makefile	Mon Aug 21 15:43:53 2017 +0300
@@ -21,18 +21,19 @@
 	MINGW_PREFIX=x86_64-w64-mingw32- \
 	MINGW_PATH=/usr/x86_64-w64-mingw32
 
-$(DATA):
+$(DATA): $(wildcard $(BPATH)/data/*)
 	cd $(BPATH)/data && $(DMLIB)/tools/packed -p $@ -c -x \*~ -v *
 
 tools:
-	cd $(DMLIB) && cp config.mak.in config.mak && make -j4
+	@if test ! -e $(DMLIB)config.mak; then cp $(DMLIB)config.mak.in $(DMLIB)config.mak; fi
+	@cd $(DMLIB) && make -j4
 
 data: tools $(DATA)
 
 package: linux-bin mingw-win32 $(DATA)
 	strip $(BINPATH)/*.bin $(BINPATH)/*.exe
 	$(RM) $(PACKAGE)
-	@cp SDL.dll LICENSE.txt README.txt file_id.diz $(BINPATH)
+	cp SDL.dll LICENSE.txt README.txt file_id.diz $(BINPATH)
 	cd $(BINPATH) && zip -x "*~" -9 $(PACKAGE) *