Mercurial > hg > batmud > maputils
annotate maps/Makefile @ 807:6f29704156db
Improve diffing.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Jul 2009 11:51:36 +0000 |
parents | 8fbde52dfdfe |
children | f5dda74e6e07 |
rev | line source |
---|---|
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
1 include ../config.mak |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
2 include config.mak |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
3 |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
4 # |
347 | 5 # Mangles and targets |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
6 # |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
7 TARGETS=$(patsubst %.map,%.html,$(MAPLIST)) \ |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
8 $(patsubst %.map,%.htm,$(MAPLIST)) \ |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
9 $(patsubst %.map,%.ansi,$(MAPLIST)) \ |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
10 $(patsubst %.map,%.png,$(MAPLIST)) |
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
11 |
103
58a07f7c50b7
Updated locations; Makefile improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
99
diff
changeset
|
12 all: $(patsubst %.map,%.ppm,$(MAPLIST)) $(TARGETS) |
39 | 13 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
14 |
307 | 15 #laenor.map: |
16 # cat ~/mapping.log | grep -v "^$$" > tmp | |
17 # $(MKSPECIAL_BIN) -v -o $@ -r 100 -R 65 -m 40 tmp -a -d -I $(patsubst %.map,%.initial,$@) | |
215 | 18 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
19 include Makefile.inc |
99 | 20 |
716 | 21 world.map: $(MAPLIST) |
99 | 22 $(COMBINE_BIN) -v -f "~" $(MAPLISTOFFS) -o $@ |
23 | |
24 world.loc: $(patsubst %.map,%.loc,$(MAPLIST)) | |
25 for i in $(MAPLISTOFFS); do $(MKLOC_BIN) -v -L -l `echo "$$i"|sed "s/^\([^\.]*\).map:.*/\1.loc/"` -m `echo "$$i"|sed "s/^\([^:]*\):\([0-9]*\):\([0-9]*\)/\1 -x \2 -y \3/"`; done > $@ | |
26 | |
716 | 27 world.ppm: world.map |
791
7da5b551d9e2
Use ImageMagick for scaling the world map image.
Matti Hamalainen <ccr@tnsp.org>
parents:
785
diff
changeset
|
28 $(MAP2PPM_BIN) $< | convert ppm:- -resize "50%" $@ |
99 | 29 |
716 | 30 world.script: world.map world.loc |
338 | 31 $(MKLOC_BIN) -vnS -m $< -l $(patsubst %.map,%.loc,$<) -u $(WORLDUNITSIZE) -s $(WORLDMAPSCALE) | \ |
405
17664dcbe722
Use a font setting in config.mak
Matti Hamalainen <ccr@tnsp.org>
parents:
387
diff
changeset
|
32 sed -e "s/@OPTS_START@/-font $(WORLDFONT) -pointsize 10 -type TruecolorMatte/g" \ |
338 | 33 -e "s/@OPTS_END@/\t-geometry +220+15 title.png -composite -compose screen \\\\\n\t-pointsize 30 -fill white -box none -draw \"text 10,30 \'\n@PAF@\n\n/g" | \ |
255
be481e1dca9e
Updated and improved generation of image-format maps.
Matti Hamalainen <ccr@tnsp.org>
parents:
237
diff
changeset
|
34 sed -e "/@PAF@/r $(patsubst %.map,%.desc,$<)" -e "s/@PAF@//g" > $@ |
39 | 35 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
36 |
39 | 37 # |
38 # Special targets | |
39 # | |
436 | 40 upload: $(TARGETS) renardy.map *.loc world.jpg util.js |
432
611b19fba3be
Use compression with scp transfers, duh.
Matti Hamalainen <ccr@tnsp.org>
parents:
405
diff
changeset
|
41 scp -C $? $(UPURL) |
141 | 42 touch $@ |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
43 |
317 | 44 uploc: *.loc |
800 | 45 scp $+ $(UPURL) |
291
b78d089a0cf4
Upload target for location files only.
Matti Hamalainen <ccr@tnsp.org>
parents:
255
diff
changeset
|
46 |
459 | 47 fetch: |
531 | 48 for i in $(MAPMAP); do wget `echo "$$i"|sed "s|^\([^:]*\):\(.*\)|-O \2.new $(BATMAPURL)\1.txt|"`; done |
459 | 49 |
50 %.diff: %.map %.new | |
670
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
51 @echo DIFFING $< ... |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
52 @if ! $(DIFFMAP_BIN) $+ -o $@ -a; then \ |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
53 $(MAP2PPM_BIN) $@ -o $@.ppm -d; \ |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
54 $(PATCHMAP_BIN) $< $@ -o $<; \ |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
55 fi |
674
02d23acc346d
Fix updating of location markers.
Matti Hamalainen <ccr@tnsp.org>
parents:
672
diff
changeset
|
56 @echo UPDATING LOCATIONS ... |
798
11e3bed89e35
Use verbosity flag in accordance to changes in mkloc.
Matti Hamalainen <ccr@tnsp.org>
parents:
791
diff
changeset
|
57 @$(MKLOC_BIN) -v -m $(patsubst %.map,%.new,$<) -l $(patsubst %.map,%.loc,$<) -L -g -o $(patsubst %.map,%.nloc,$<) |
674
02d23acc346d
Fix updating of location markers.
Matti Hamalainen <ccr@tnsp.org>
parents:
672
diff
changeset
|
58 @diff -ubB $(patsubst %.map,%.loc,$<) $(patsubst %.map,%.nloc,$<) | patch |
459 | 59 |
653
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
60 cleardiff: |
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
61 $(RM) *.diff |
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
62 |
807 | 63 diff: cleardiff $(patsubst %.map,%.diff,$(MAPLIST)) |
64 @svn diff | |
459 | 65 |
39 | 66 clean: |
460 | 67 $(RM) $(TARGETS) *.diff *.ppm *.o |
39 | 68 |
69 srcclean: clean | |
299 | 70 $(RM) *~ |
39 | 71 |
297
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
72 update: |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
73 @echo "* Updating from SVN ..." |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
74 @svn update |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
75 |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
76 .changelog: update |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
77 @echo "* Making ChangeLog ..." |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
78 @svn2cl --strip-prefix "maputils/trunk/maps/" --group-by-day --include-rev |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
79 @touch $@ |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
80 |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
81 ChangeLog: .changelog |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
82 |