Mercurial > hg > batmud > maputils
annotate maps/Makefile @ 842:f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 25 Sep 2009 09:02:00 +0000 |
parents | 6f29704156db |
children | 4a93a15728d7 |
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 |
842
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
12 all: |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
13 @echo "Usage: make <maps|fetch|diff|upload>" |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
14 @echo |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
15 @echo "maps : Build HTML, HTML+JS, PNG image and ANSI format maps." |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
16 @echo "fetch : Fetch latest raw ASCII map data from bat.org." |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
17 @echo "diff : Do special diff operation between new data (gotten via 'fetch')" |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
18 @echo " and update .loc files for each continent with new locations." |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
19 @echo " A diff -u of new and old location files is outputted." |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
20 @echo "upload: Uploads map and loc-files via SCP to server specified in" |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
21 @echo " ../config.mak" |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
22 |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
23 |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
24 maps: $(patsubst %.map,%.ppm,$(MAPLIST)) $(TARGETS) |
39 | 25 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
26 |
307 | 27 #laenor.map: |
28 # cat ~/mapping.log | grep -v "^$$" > tmp | |
29 # $(MKSPECIAL_BIN) -v -o $@ -r 100 -R 65 -m 40 tmp -a -d -I $(patsubst %.map,%.initial,$@) | |
215 | 30 |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
31 include Makefile.inc |
99 | 32 |
39 | 33 # |
34 # Special targets | |
35 # | |
842
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
36 upload: $(TARGETS) renardy.map *.loc util.js |
432
611b19fba3be
Use compression with scp transfers, duh.
Matti Hamalainen <ccr@tnsp.org>
parents:
405
diff
changeset
|
37 scp -C $? $(UPURL) |
141 | 38 touch $@ |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
39 |
317 | 40 uploc: *.loc |
800 | 41 scp $+ $(UPURL) |
291
b78d089a0cf4
Upload target for location files only.
Matti Hamalainen <ccr@tnsp.org>
parents:
255
diff
changeset
|
42 |
459 | 43 fetch: |
531 | 44 for i in $(MAPMAP); do wget `echo "$$i"|sed "s|^\([^:]*\):\(.*\)|-O \2.new $(BATMAPURL)\1.txt|"`; done |
459 | 45 |
46 %.diff: %.map %.new | |
670
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
47 @echo DIFFING $< ... |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
48 @if ! $(DIFFMAP_BIN) $+ -o $@ -a; then \ |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
49 $(MAP2PPM_BIN) $@ -o $@.ppm -d; \ |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
50 $(PATCHMAP_BIN) $< $@ -o $<; \ |
8f16bf5c2f9e
Do the diffs more intelligently.
Matti Hamalainen <ccr@tnsp.org>
parents:
653
diff
changeset
|
51 fi |
674
02d23acc346d
Fix updating of location markers.
Matti Hamalainen <ccr@tnsp.org>
parents:
672
diff
changeset
|
52 @echo UPDATING LOCATIONS ... |
798
11e3bed89e35
Use verbosity flag in accordance to changes in mkloc.
Matti Hamalainen <ccr@tnsp.org>
parents:
791
diff
changeset
|
53 @$(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
|
54 @diff -ubB $(patsubst %.map,%.loc,$<) $(patsubst %.map,%.nloc,$<) | patch |
459 | 55 |
653
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
56 cleardiff: |
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
57 $(RM) *.diff |
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
58 |
807 | 59 diff: cleardiff $(patsubst %.map,%.diff,$(MAPLIST)) |
60 @svn diff | |
459 | 61 |
39 | 62 clean: |
460 | 63 $(RM) $(TARGETS) *.diff *.ppm *.o |
39 | 64 |
65 srcclean: clean | |
299 | 66 $(RM) *~ |
39 | 67 |
297
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
68 update: |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
69 @echo "* Updating from SVN ..." |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
70 @svn update |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
71 |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
72 .changelog: update |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
73 @echo "* Making ChangeLog ..." |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
74 @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
|
75 @touch $@ |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
76 |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
77 ChangeLog: .changelog |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
78 |