Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 23d6d6a5dee1b3891a423795f4b554c6 > files > 154

crossfire-1.0.0-3mdk.ppc.rpm


FILES = Makefile.in monster-extract spells-extract stats-extract arm-extract\
 	helm-extract mag-extract shield-extract items-extract spoiler.tex\
 	sorter makeps empty.pbm bow-extract arche-extract weap-extract

TEX =	monput.tex spells.tex stats.tex weap.tex shield.tex helmet.tex\
 	mag.tex arm.tex arche.tex bow.tex version.tex weapmag.tex

CROSSBIN = ../..//server/crossfire
CROSSRC = ../..
INCDIR = ../../include

prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
localdir = @localstatedir@
AWK = @AWK@

spoiler:: ../spoiler.ps

../spoiler.ps: spoiler.dvi
	dvips -o ../spoiler.ps spoiler.dvi

all::

spoiler.dvi: spoiler.aux
	latex spoiler.tex

spoiler.aux: spoiler.tex $(TEX)
	$(RM) spoiler.aux
	latex spoiler.tex

$(CROSSBIN):
	@$(RM) dump_switches
	@$(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.")

	@$(MAKE) $(MFLAGS) check_ok

check_ok: dump_switches
	@$(RM) dump_switches

.bmaps: ../../lib/archetypes
	$(RM) *.ps
	touch .bmaps

items: .bmaps in_items makeps items.ps
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_items -f makeps $(datadir)/archetypes > items

in_items: items-extract $(datadir)/archetypes $(CROSSRC)/common/living.c
	$(AWK) -v living_c=$(CROSSRC)/common/living.c 		-f items-extract $(datadir)/archetypes > in_items

stats.tex: .bmaps in_stats makeps characters.ps
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_stats -f makeps $(datadir)/archetypes > stats.tex

in_stats: stats-extract $(datadir)/archetypes $(CROSSRC)/common/living.c
	$(AWK) -v living_c=$(CROSSRC)/common/living.c 		-f stats-extract $(datadir)/archetypes > in_stats

monput.tex: .bmaps in_monput makeps monsters.ps
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_monput -f makeps $(datadir)/archetypes > monput.tex

in_monput: monster-extract $(CROSSBIN) $(datadir)/treasures $(datadir)/archetypes
	$(CROSSBIN) -m2 | sort -f | 		$(AWK) -F'|' -f monster-extract > in_monput

spells.tex: .bmaps in_spells makeps spells.ps
	$(AWK) -v libdir=$(CROSSRC)/lib -v archdir=$(CROSSRC)/lib/ -v size=0.4 -v input=in_spells -f makeps $(datadir)/archetypes > spells.tex

in_spells: spells-extract sorter $(INCDIR)/spellist.h $(CROSSBIN) $(datadir)/archetypes
	tr -d \" < $(INCDIR)/spellist.h | 		$(AWK) -F, -v crosscmd="$(CROSSBIN) -m4" 			-f spells-extract | sort > in_spells

version.tex: $(CROSSBIN)
	$(CROSSBIN) -v 2>&1 | grep "^This is" | 		cut -d" " -f3- > version.tex

characters.ps items.ps monsters.ps spells.ps:
	touch $@

weap.tex: items sorter
	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

shield.tex: items shield-extract
	egrep -e "^33 " items | $(AWK) -F'&' -f shield-extract | sort > shield.tex

arm.tex: items arm-extract
	egrep -e "^16 " items | $(AWK) -F'&' -f arm-extract | sort -t'&' -n +4 -5 > arm.tex

helmet.tex: items helm-extract
	egrep -e "^34 " items | $(AWK) -F'&' -f helm-extract | 		sort -t'&' -n +3 -4 | sed -e s/_/' '/g > helmet.tex

bow.tex: items bow-extract
	egrep -e "^14 " items | $(AWK) -F'&' -f bow-extract | sort > bow.tex

arche.tex: items arche-extract
	egrep -e "^915 " items | $(AWK) -F'&' -f arche-extract | sort > arche.tex

weapmag.tex: items weap-extract
	egrep -e "^15 " items | $(AWK) -F'&' -f weap-extract | sort > weapmag.tex

mag.tex: items mag-extract
	$(AWK) -F'&' -f mag-extract items | sort +0.9 -0.10 > mag.tex

install::

depend::

clean::
	$(RM) $(TEX)
	$(RM) items .bmaps in_monput in_items in_spells
	$(RM) *.ps *x*.ppm tmp.ppm work.ppm
	$(RM) spoiler.dvi spoiler.log spoiler.aux

distclean::
	$(RM) -f Makefile

archive::
	@if [ ! -d $(ARCHIVE)/doc/spoiler ]; then $(MKDIR)  $(ARCHIVE)/doc/spoiler; fi
	$(CP) $(FILES) $(ARCHIVE)/doc/spoiler

patchlist::
	echo $(FILES) > .patchlist