changeset 1547:2768b2b396a5

Cosmetics and comments.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 03 Mar 2015 19:07:50 +0200
parents 20757718fedf
children 280e503820ae
files Makefile.gen maps/Makefile maps/Makefile.inc
diffstat 3 files changed, 42 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.gen	Tue Mar 03 19:03:30 2015 +0200
+++ b/Makefile.gen	Tue Mar 03 19:07:50 2015 +0200
@@ -1,12 +1,15 @@
+###
+### Include configuration
+###
 include config.mak
 
 CFLAGS += -g -O2 -W -Wall -Ith-libs/
 #CFLAGS += -Wextra -DNDEBUG -std=c99 -pedantic
 COLORMAP_OPTS=-u "www/urchin.inc.php"
 
-#
-# Objects
-#
+###
+### Objects
+###
 MKSPECIAL_BIN=$(BINPATH)mkspecial$(EXEEXT)
 COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT)
 MKCITYMAP_BIN=$(BINPATH)mkcitymap$(EXEEXT)
@@ -35,9 +38,9 @@
 	$(MKLOC_BIN) $(COMBINE_BIN) $(MAPSTATS_BIN)	\
 	$(filter %.html,$(MAPFILES))
 
-#
-# Target rules
-#
+###
+### Target rules
+###
 all: $(TARGETS)
 
 LINKOBJS=libmaputils.o liblocfile.o th-libs/th_args.o th-libs/th_util.o th-libs/th_string.o
@@ -92,9 +95,9 @@
 %.html: %.map %.loc %.desc $(MKCITYMAP_BIN)
 	$(MKCITYMAP_BIN) -t "`cat $(patsubst %.map,%.desc,$<)`" $< $(patsubst %.map,%.loc,$<) `cat $(patsubst %.map,%.opts,$<)` -u "www/urchin.inc.php" -o "$@"
 
-#
-# Special targets
-#
+###
+### Special targets
+###
 ChangeLog:
 	@hg up
 	@hg2cl
--- a/maps/Makefile	Tue Mar 03 19:03:30 2015 +0200
+++ b/maps/Makefile	Tue Mar 03 19:07:50 2015 +0200
@@ -1,9 +1,9 @@
 include ../config.mak
 include config.mak
 
-#
-# Mangles and targets
-#
+###
+### Main targets
+###
 TARGETS=$(addsuffix .html,$(MAPLIST)) \
 	$(addsuffix .ansi,$(MAPLIST)) \
 	$(addsuffix .png,$(MAPLIST))
@@ -11,6 +11,9 @@
 #	$(addsuffix .htm,$(MAPLIST)) \
 
 
+###
+### If no target specified, show some help
+###
 all:
 	@echo "Usage: make <maps|fetch|diff|upload|clean>"
 	@echo
@@ -26,10 +29,13 @@
 	@echo
 
 
+###
+### Maps
+###
 maps: $(addsuffix .ppm,$(MAPLIST)) $(TARGETS)
 
+include Makefile.inc
 
-include Makefile.inc
 
 ###
 ### Special targets
@@ -81,12 +87,12 @@
 	$(RM) *~
 
 update:
-	@echo "* Updating from HG ..."
+	@echo "* Updating from Mercurial repo ..."
 	@hg fetch
 
 .changelog: update
 	@echo "* Making ChangeLog ..."
-	@hg2cl --strip-prefix "maputils/trunk/maps/"
+	@hg2cl
 	@touch $@
 
 ChangeLog: .changelog
--- a/maps/Makefile.inc	Tue Mar 03 19:03:30 2015 +0200
+++ b/maps/Makefile.inc	Tue Mar 03 19:07:50 2015 +0200
@@ -1,3 +1,6 @@
+###
+### Tool binary paths
+###
 COLORMAP_BIN=$(BINPATH)colormap$(EXEEXT)
 MKLOC_BIN=$(BINPATH)mkloc$(EXEEXT)
 MKSPECIAL_BIN=$(BINPATH)mkspecial$(EXEEXT)
@@ -7,6 +10,10 @@
 DIFFMAP_BIN=$(BINPATH)diffmap$(EXEEXT)
 PATCHMAP_BIN=$(BINPATH)patchmap$(EXEEXT)
 
+
+###
+### Intermediate file targets
+###
 %.tmp: %.map %.loc
 	$(MKLOC_BIN) -v -o $@ -m $< -l $(patsubst %.map,%.loc,$<)
 
@@ -16,6 +23,10 @@
 %.tmp3: %.loc
 	$(MKLOC_BIN) -v -M -l $< -o $@
 
+###
+### HTML format maps
+###
+
 #%.html: %.tmp %.desc
 #	$(COLORMAP_BIN) $(COLORMAP_OPTS) $(EXTRAOPTS) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -a -C -f xhtml -o $@ $<
 
@@ -24,9 +35,16 @@
 	sed -e "/@LOCATIONS@/r $(patsubst %.tmp2,%.tmp3,$<)" -e "s/@LOCATIONS@//g" > $@
 
 
+###
+### ANSI text
+###
 %.ansi: %.tmp %.desc
 	$(COLORMAP_BIN) $(COLORMAP_OPTS) $(EXTRAOPTS) -t "`cat $(patsubst %.tmp,%.desc,$<)`" -a -C -f ansi -o $@ $<
 
+
+###
+### PNG images
+###
 %.script: %.map %.loc
 	$(MKLOC_BIN) -S -m $< -l $(patsubst %.map,%.loc,$<) -f $(FONTSCALE) -u $(UNITSIZE) -s $(MAPSCALE) | \
 	sed -e "s/@OPTS_START@/-font $(FONT) -pointsize 14 -type TruecolorMatte/g" \