Debian Codegraph @

doc/spoiler-html/Makefile.am

raw
1 EXTRA_DIST = spells-extract stats-extract\
2 spoiler.shtml helm-extract mag-extract shield-extract \
3 empty.pbm bow-extract arche-extract weap-extract
4
5 HTML = monput.html spells.html stats.html weap.html shield.html helmet.html\
6 mag.html arm.html arche.html bow.html version.html weapmag.html
7
8 CLEANFILES = items .bmaps in_monput in_items in_spells in_stats \
9 *x*.ppm tmp.ppm work.ppm *.png $(HTML) spoiler.html
10
11 CROSSBIN = ../../server/crossfire-server
12 INCDIR = $(top_srcdir)/include
13 DTOP = $(top_srcdir)/$(PACKAGE)-doc
14 PERL = @PERL@
15
16 spoiler.html: $(HTML) spoiler.shtml
17 $(PERL) $(srcdir)/../include_html.pl spoiler.shtml spoiler.html
18
19 dump_switches: $(CROSSBIN)
20 @$(RM) dump_switches
21 @$(CROSSBIN) -m >/dev/null 2>&1 && touch dump_switches || (echo "You need to define DUMP_SWITCHES in include/config.h and"; echo "recompile before you can create the spoilers.")
22 @$(MAKE) $(MFLAGS) check_ok
23
24 $(CROSSBIN):
25 ( cd $(top_srcdir)/server ; make crossfire )
26
27 check_ok: dump_switches
28 @$(RM) dump_switches
29
30 .bmaps: $(pkgdatadir)/archetypes
31 $(RM) *.gif
32 touch .bmaps
33
34 items: .bmaps in_items ../scripts/makeps.pl items.gif
35 $(PERL) ../scripts/makeps.pl output=png libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_items inarch=$(pkgdatadir)/archetypes > items
36
37 in_items: $(srcdir)/../scripts/items-extract.pl $(pkgdatadir)/archetypes $(top_srcdir)/common/living.c
38 $(PERL) $(srcdir)/../scripts/items-extract.pl living_c=$(top_srcdir)/common/living.c $(pkgdatadir)/archetypes > in_items
39
40 stats.html: .bmaps in_stats ../scripts/makeps.pl stats.gif
41 $(PERL) ../scripts/makeps.pl output=png libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_stats inarch=$(pkgdatadir)/archetypes > stats.html
42
43 in_stats: stats-extract $(pkgdatadir)/archetypes $(top_srcdir)/common/living.c
44 $(AWK) -v living_c=$(top_srcdir)/common/living.c -f stats-extract $(pkgdatadir)/archetypes > in_stats
45
46 monput.html: .bmaps in_monput ../scripts/makeps.pl monsters.gif
47 $(PERL) ../scripts/makeps.pl output=png libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_monput inarch=$(pkgdatadir)/archetypes > monput.html
48
49 in_monput: ../scripts/monster-extract.pl $(CROSSBIN) $(pkgdatadir)/treasures $(pkgdatadir)/archetypes
50 $(CROSSBIN) -m2 | sort -f | $(PERL) ../scripts/monster-extract.pl > in_monput
51
52 spells.html: .bmaps in_spells ../scripts/makeps.pl spells.gif
53 $(PERL) ../scripts/makeps.pl output=png libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_spells inarch=$(pkgdatadir)/archetypes > spells.html
54
55 in_spells: spells-extract $(INCDIR)/spellist.h $(CROSSBIN) $(pkgdatadir)/archetypes
56 tr -d \" < $(INCDIR)/spellist.h | $(AWK) -F, -v crosscmd="$(CROSSBIN) -m4" -f spells-extract | sort > in_spells
57
58 version.html: $(CROSSBIN)
59 $(CROSSBIN) -v 2>&1 | grep "^This is" | cut -d" " -f3- > version.html
60
61 stats.gif items.gif monsters.gif spells.gif:
62 touch $@
63
64 weap.html: items
65 egrep -e "^15 " items | $(AWK) -F'&' '{printf("<tr><th>%s</th><td>%s</td><td>%s</td><td>%.2f</td><td>%s</td></tr>\n",$$3,$$10,$$5,$$11,$$6)}' > weap.html
66
67 shield.html: items shield-extract
68 egrep -e "^33 " items | $(AWK) -F'&' -f shield-extract | sort > shield.html
69
70 arm.html: items arm-extract
71 egrep -e "^16 " items | $(AWK) -F'&' -f arm-extract | sort -t'&' -n +4 -5 > arm.html
72
73 helmet.html: items helm-extract
74 egrep -e "^34 " items | $(AWK) -F'&' -f helm-extract | sort -t'&' -n +3 -4 | sed -e s/_/' '/g > helmet.html
75
76 bow.html: items bow-extract
77 egrep -e "^14 " items | $(AWK) -F'&' -f bow-extract | sort > bow.html
78
79 arche.html: items arche-extract
80 egrep -e "^915 " items | $(AWK) -F'&' -f arche-extract | sort > arche.html
81
82 weapmag.html: items weap-extract
83 egrep -e "^15 " items | $(AWK) -F'&' -f weap-extract | sort > weapmag.html
84
85 mag.html: items mag-extract
86 $(AWK) -F'&' -f mag-extract items | sort +0.9 -0.10 > mag.html
87
88 archive: spoiler.html
89 $(mkinstalldirs) $(DTOP)/spoiler-html
90 cp spoiler.html $(DTOP)/spoiler-html
91 cp *.gif $(DTOP)/spoiler-html