Mercurial > hg > batmud > maputils
changeset 2397:b76c25ad1b99
Change how batclient.xml is uploaded. Some improvements to the build rules.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 09 Nov 2021 02:23:25 +0200 |
parents | ac5a822828d0 |
children | 37b2acb15a40 |
files | world/Makefile |
diffstat | 1 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/world/Makefile Tue Nov 09 02:08:57 2021 +0200 +++ b/world/Makefile Tue Nov 09 02:23:25 2021 +0200 @@ -2,10 +2,11 @@ include config.mak ### -### Detect curl or wget +### Detect if we have some things ### HAVE_CURL ?= $(shell curl --version > /dev/null && echo "yes") HAVE_WGET ?= $(shell wget --version > /dev/null && echo "yes") +HAVE_PHP ?= $(shell php --version > /dev/null && echo "yes") ifeq ($(HAVE_CURL),yes) HTTPGET ?= curl -o @@ -23,11 +24,19 @@ ### ### Main targets ### -TARGETS=$(addsuffix .html,$(WORLD_MAPS)) \ +TARGETS = \ + $(addsuffix .html,$(WORLD_MAPS)) \ $(addsuffix .ansi,$(WORLD_MAPS)) \ $(addsuffix .png,$(WORLD_MAPS)) \ $(addsuffix .htm,$(WORLD_MAPS)) \ - util.js + util.js changelog.txt + +LOCFILES = $(addsuffix .loc,$(WORLD_MAPS)) special.loc limbo.loc + +ifeq ($(HAVE_PHP),yes) +TARGETS += batclient.xml +EXTRA_UPLOAD += batclient.xml +endif ### @@ -60,14 +69,12 @@ include Makefile.inc -LOCLIST=$(addsuffix .loc,$(WORLD_MAPS)) special.loc limbo.loc - ### ### Special targets ### changelog.txt: $(addsuffix .map,$(WORLD_MAPS)) \ - $(LOCLIST) \ + $(LOCFILES) \ $(addprefix ../$(MISC_MAPS_PATH),$(addsuffix .map,$(MISC_MAPS))) \ $(addprefix ../$(MISC_MAPS_PATH),$(addsuffix .loc,$(MISC_MAPS))) @( echo '<?xml version="1.0"?>' && echo '<log>' && \ @@ -88,18 +95,12 @@ @touch $@ # Build batclient.xml -HAVE_PHP ?= $(shell php --version > /dev/null && echo "yes") -ifeq ($(HAVE_PHP),yes) -TARGETS += batclient.xml - batclient.xml: $(addsuffix .loc,$(WORLD_MAPS)) $(MKLOC_BIN) ../www/world.inc.php php ../src/genbcxml.php $(MKLOC_BIN) ./ ../www/world.inc.php $@ -endif - # Upload changed files to site -upload: $(TARGETS) $(LOCLIST) changelog.txt +upload: $(TARGETS) $(LOCFILES) $(EXTRA_UPLOAD) $(RSCP) $? $(UPLOAD_URL) @touch $@ @@ -110,7 +111,7 @@ -@ls -lt $+ gimp # Upload only *.loc files -uploc: $(LOCLIST) +uploc: $(LOCFILES) $(EXTRA_UPLOAD) $(RSCP) $+ $(UPLOAD_URL) # Fetch raw ASCII maps from bat.org to *.new