Mercurial > hg > batmud > maputils
annotate world/Makefile @ 1708:9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 12 Oct 2017 11:43:43 +0300 |
parents | f3f7fd0d4a20 |
children | 7bf994eb50bd |
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 |
1547 | 4 ### |
5 ### Main targets | |
6 ### | |
1708
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
7 TARGETS=$(addsuffix .html,$(WORLD_MAPS)) \ |
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
8 $(addsuffix .ansi,$(WORLD_MAPS)) \ |
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
9 $(addsuffix .png,$(WORLD_MAPS)) \ |
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
10 $(addsuffix .htm,$(WORLD_MAPS)) \ |
1624 | 11 util.js |
1536
796cf56a9b0a
Disable plain HTML (non-javascript enhanced) versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
1515
diff
changeset
|
12 |
796cf56a9b0a
Disable plain HTML (non-javascript enhanced) versions.
Matti Hamalainen <ccr@tnsp.org>
parents:
1515
diff
changeset
|
13 |
1547 | 14 ### |
15 ### If no target specified, show some help | |
16 ### | |
842
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
17 all: |
1695
76b95f35c0a9
Minor updates to docs and help.
Matti Hamalainen <ccr@tnsp.org>
parents:
1624
diff
changeset
|
18 @echo "Usage: make <maps|fetch|diff|upload|gimp|clean>" |
842
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
19 @echo |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
20 @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
|
21 @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
|
22 @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
|
23 @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
|
24 @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
|
25 @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
|
26 @echo " ../config.mak" |
1514
835360392879
Add target for automatically running Gimp for PNG post-processing.
Matti Hamalainen <ccr@tnsp.org>
parents:
1512
diff
changeset
|
27 @echo "gimp : Execute Gimp with all PNG targets for post-processing." |
1512 | 28 @echo "clean : Delete all the generated files." |
29 @echo | |
842
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
30 |
f5dda74e6e07
Print help if no target is given. Remove generation of worldmap.
Matti Hamalainen <ccr@tnsp.org>
parents:
807
diff
changeset
|
31 |
1547 | 32 ### |
33 ### Maps | |
34 ### | |
1708
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
35 maps: $(addsuffix .ppm,$(WORLD_MAPS)) $(TARGETS) |
39 | 36 |
1547 | 37 include Makefile.inc |
346
721bfe123726
Minor refactoring of the build files.
Matti Hamalainen <ccr@tnsp.org>
parents:
338
diff
changeset
|
38 |
1708
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
39 LOCLIST=$(addsuffix .loc,$(WORLD_MAPS)) special.loc limbo.loc |
99 | 40 |
950 | 41 ### |
42 ### Special targets | |
43 ### | |
44 | |
45 # Upload changed files to site | |
1624 | 46 upload: $(TARGETS) renardy.map tormentas.map $(LOCLIST) |
1623 | 47 @scp -C $? $(UPLOAD_URL) |
48 @touch $@ | |
95
0d2b25e342df
Also make PNG images from maps
Matti Hamalainen <ccr@tnsp.org>
parents:
90
diff
changeset
|
49 |
1514
835360392879
Add target for automatically running Gimp for PNG post-processing.
Matti Hamalainen <ccr@tnsp.org>
parents:
1512
diff
changeset
|
50 # Open PNG files in Gimp |
1708
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
51 gimp: $(addsuffix .png,$(WORLD_MAPS)) |
1621
471fa81c6c67
Improve 'make gimp' target a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
52 -@ls -lt $+ gimp |
471fa81c6c67
Improve 'make gimp' target a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
53 @gimp $+ && touch $@ |
471fa81c6c67
Improve 'make gimp' target a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1586
diff
changeset
|
54 -@ls -lt $+ gimp |
1514
835360392879
Add target for automatically running Gimp for PNG post-processing.
Matti Hamalainen <ccr@tnsp.org>
parents:
1512
diff
changeset
|
55 |
950 | 56 # Upload only *.loc files |
1585
f1c40a6a4019
Fix and improve *.loc file uploads.
Matti Hamalainen <ccr@tnsp.org>
parents:
1575
diff
changeset
|
57 uploc: $(LOCLIST) |
1623 | 58 @scp $+ $(UPLOAD_URL) |
291
b78d089a0cf4
Upload target for location files only.
Matti Hamalainen <ccr@tnsp.org>
parents:
255
diff
changeset
|
59 |
950 | 60 # Fetch raw ASCII maps from bat.org to *.new |
459 | 61 fetch: |
1708
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
62 for i in $(CONT_MAPS); do wget -O "$$i.new" "$(BATMAPURL)$$i.txt"; done |
459 | 63 |
64 | |
950 | 65 # Remove all temporary .diff files |
653
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
66 cleardiff: |
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
67 $(RM) *.diff |
b5bd0d457481
Improved 'make diff' target.
Matti Hamalainen <ccr@tnsp.org>
parents:
605
diff
changeset
|
68 |
950 | 69 # Diff target - run diff for each .map and .new (fetched via 'fetch' target). |
1069
25cf3cf2acc8
Change to use Mercurial instead of Subversion.
Matti Hamalainen <ccr@tnsp.org>
parents:
950
diff
changeset
|
70 # Finally do 'hg diff' to show changes. |
1708
9a124fdb6dab
Rename various Makefile variables and improve + modularize hcbat-related things better.
Matti Hamalainen <ccr@tnsp.org>
parents:
1707
diff
changeset
|
71 diff: cleardiff $(addsuffix .diff,$(CONT_MAPS)) |
1155
2f7ca3ec98e8
Only 'hg diff' current directory with 'make diff'.
Matti Hamalainen <ccr@tnsp.org>
parents:
1069
diff
changeset
|
72 @hg diff . |
459 | 73 |
1623 | 74 %.js: ../%.js |
75 @ln -s $< $@ | |
76 | |
950 | 77 # Clean temporary and generated targets |
39 | 78 clean: |
937
9342d636bc21
Remove *.script files on clean target.
Matti Hamalainen <ccr@tnsp.org>
parents:
911
diff
changeset
|
79 $(RM) $(TARGETS) *.diff *.ppm *.o *.script |
39 | 80 |
81 srcclean: clean | |
299 | 82 $(RM) *~ |
39 | 83 |
297
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
84 update: |
1547 | 85 @echo "* Updating from Mercurial repo ..." |
1069
25cf3cf2acc8
Change to use Mercurial instead of Subversion.
Matti Hamalainen <ccr@tnsp.org>
parents:
950
diff
changeset
|
86 @hg fetch |
297
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
87 |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
88 .changelog: update |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
89 @echo "* Making ChangeLog ..." |
1547 | 90 @hg2cl |
297
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
91 @touch $@ |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
92 |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
93 ChangeLog: .changelog |
5482736f3913
ChangeLog generation target added.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
94 |