Debian Codegraph @

doc/spoiler/Makefile.am

raw
1 EXTRA_DIST = monster-extract spells-extract stats-extract arm-extract\
2 helm-extract mag-extract shield-extract items-extract spoiler.tex\
3 sorter empty.pbm bow-extract arche-extract weap-extract
4
5 TEX = monput.tex spells.tex stats.tex weap.tex shield.tex helmet.tex\
6 mag.tex arm.tex arche.tex bow.tex version.tex weapmag.tex
7
8 CLEANFILES = $(TEX) items .bmaps in_monput in_items in_spells in_stats \
9 *.ps *x*.ppm tmp.ppm work.ppm spoiler.dvi spoiler.log spoiler.aux
10
11 CROSSBIN = ../../server/crossfire-server
12 INCDIR = $(top_srcdir)/include
13 PERL = @PERL@
14
15 spoiler: ../spoiler.ps
16
17 ../spoiler.ps: spoiler.dvi
18 dvips -o ../spoiler.ps spoiler.dvi
19
20 spoiler.dvi: spoiler.aux
21 latex spoiler.tex
22
23 spoiler.aux: spoiler.tex $(TEX)
24 $(RM) spoiler.aux
25 latex spoiler.tex
26
27 dump_switches:
28 @$(RM) dump_switches
29 @$(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.")
30
31 @$(MAKE) $(MFLAGS) check_ok
32
33 check_ok: dump_switches
34 @$(RM) dump_switches
35
36 .bmaps: ../../lib/archetypes
37 $(RM) *.ps
38 touch .bmaps
39
40 items: .bmaps in_items ../scripts/makeps.pl items.ps
41 $(PERL) ../scripts/makeps.pl output=tex libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_items inarch=$(pkgdatadir)/archetypes > items
42
43 in_items: items-extract $(pkgdatadir)/archetypes $(top_srcdir)/common/living.c
44 $(AWK) -v living_c=$(top_srcdir)/common/living.c -f items-extract $(pkgdatadir)/archetypes > in_items
45
46 stats.tex: .bmaps in_stats ../scripts/makeps.pl characters.ps
47 $(PERL) ../scripts/makeps.pl output=tex libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_stats inarch=$(pkgdatadir)/archetypes > stats.tex
48
49 in_stats: stats-extract $(pkgdatadir)/archetypes $(top_srcdir)/common/living.c
50 $(AWK) -v living_c=$(top_srcdir)/common/living.c -f stats-extract $(pkgdatadir)/archetypes > in_stats
51
52 monput.tex: .bmaps in_monput ../scripts/makeps.pl monsters.ps
53 $(PERL) ../scripts/makeps.pl output=tex libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_monput inarch=$(pkgdatadir)/archetypes > monput.tex
54
55 in_monput: monster-extract $(CROSSBIN) $(pkgdatadir)/treasures $(pkgdatadir)/archetypes
56 $(CROSSBIN) -m2 | sort -f | $(AWK) -F'|' -f monster-extract > in_monput
57
58 spells.tex: .bmaps in_spells ../scripts/makeps.pl spells.ps
59 $(PERL) ../scripts/makeps.pl output=tex libdir=$(top_srcdir)/lib archdir=$(top_srcdir)/lib/ size=0.4 input=in_spells inarch=$(pkgdatadir)/archetypes > spells.tex
60
61 in_spells: spells-extract sorter $(INCDIR)/spellist.h $(CROSSBIN) $(pkgdatadir)/archetypes
62 tr -d \" < $(INCDIR)/spellist.h | $(AWK) -F, -v crosscmd="$(CROSSBIN) -m4" -f spells-extract | sort > in_spells
63
64 version.tex: $(CROSSBIN)
65 $(CROSSBIN) -v 2>&1 | grep "^This is" | cut -d" " -f3- > version.tex
66
67 characters.ps items.ps monsters.ps spells.ps:
68 touch $@
69
70 weap.tex: items sorter
71 egrep -e "^15 " items | $(AWK) -F'&' '{printf("%s &%s &%s &%.2f &%s\n",$$3,$$10,$$5,$$11,$$6)}' | sort | $(AWK) -F'&' -f sorter -v lengde=`egrep -e "^15" items | wc -l | tr -d ' ' ` | sort | cut -d'&' -f 2- > weap.tex
72
73 shield.tex: items shield-extract
74 egrep -e "^33 " items | $(AWK) -F'&' -f shield-extract | sort > shield.tex
75
76 arm.tex: items arm-extract
77 egrep -e "^16 " items | $(AWK) -F'&' -f arm-extract | sort -t'&' -n +4 -5 > arm.tex
78
79 helmet.tex: items helm-extract
80 egrep -e "^34 " items | $(AWK) -F'&' -f helm-extract | sort -t'&' -n +3 -4 | sed -e s/_/' '/g > helmet.tex
81
82 bow.tex: items bow-extract
83 egrep -e "^14 " items | $(AWK) -F'&' -f bow-extract | sort > bow.tex
84
85 arche.tex: items arche-extract
86 egrep -e "^915 " items | $(AWK) -F'&' -f arche-extract | sort > arche.tex
87
88 weapmag.tex: items weap-extract
89 egrep -e "^15 " items | $(AWK) -F'&' -f weap-extract | sort > weapmag.tex
90
91 mag.tex: items mag-extract
92 $(AWK) -F'&' -f mag-extract items | sort +0.9 -0.10 > mag.tex