changeset 2631:aeab23e7e584

Generalize the build process of old maps, too.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 18 Feb 2024 05:19:57 +0200
parents 0baf2234e498
children 103d340c3090
files old/Makefile
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/old/Makefile	Sun Feb 18 05:18:07 2024 +0200
+++ b/old/Makefile	Sun Feb 18 05:19:57 2024 +0200
@@ -13,9 +13,14 @@
 COLORMAP_EXTRA = -O
 DIFFMAP_OPTS = -O
 
-TARGETS=batmap.html batmap.htm batmap.ansi \
-	hcbat.html hcbat.htm hcbat.ansi \
-	batcity.html worldmap.js citymap.js misc.css
+OLDMAPS=batmap.map hcbat.map
+
+TARGETS=\
+	$(patsubst %.map,%.html,$(OLDMAPS)) \
+	$(patsubst %.map,%.htm,$(OLDMAPS)) \
+	$(patsubst %.map,%.ansi,$(OLDMAPS)) \
+	batcity.html \
+	worldmap.js citymap.js misc.css
 
 
 ###
@@ -31,12 +36,12 @@
 
 
 
-hcbat.loc: hcbat.ref mapref.pl $(addprefix $(WORLDMAP_PATH),$(addsuffix .loc,$(WORLD_MAPS)))
+%.loc: %.ref mapref.pl $(addprefix $(WORLDMAP_PATH),$(addsuffix .loc,$(WORLD_MAPS)))
 	@if command -v perl > /dev/null; then \
 		echo "Generating $@"; \
 		perl -w ./mapref.pl $+ > $@; \
 	else \
-		echo "WARNING: perl not found, not updating $@"; \
+		echo "WARNING: Perl not found, not updating $@"; \
 	fi
 
 # Remove all temporary .diff files
@@ -48,9 +53,7 @@
 diff: cleardiff $(addsuffix .diff,hcbat)
 	@hg diff .
 
-###
-### Special targets
-###
+
 %.js:: ../src/%.js
 	@ln -s $< $@