# This is the Makefile for the Linux FailSafe Admin Guide BOOKS := book.sgml book.sgml: admintools.sgml clustproc.sgml diag.sgml gloss.sgml intro.sgml operate.sgml planning.sgml config.sgml example.sgml index.sgml nodeconfig.sgml overview.sgml recover.sgml PS := $(patsubst %.sgml, %.ps, $(BOOKS)) PDF := $(patsubst %.sgml, %.pdf, $(BOOKS)) HTML := $(patsubst %.sgml, %, $(BOOKS)) HTMLTAR := $(patsubst %.sgml, %.tar, $(BOOKS)) EPS-book := figures/a1-1.failsafe.components.eps \ figures/ha.cluster.config.info.flow.eps \ figures/a1-6.disk.storage.takeover.eps \ figures/ha.cluster.messages.eps \ figures/a2-1.examp.interface.config.eps \ figures/machine.not.in.ha.cluster.eps \ figures/a2-3.non.shared.disk.config.eps \ figures/n1n4.eps \ figures/a2-4.shared.disk.config.eps \ figures/software.layers.eps \ figures/a2-5.shred.disk.2active.cnfig.eps GIF-book := $(patsubst %.eps, %.gif, $(EPS-book)) .PHONY: books ps pdf html clean mrproper ps: $(PS) pdf: $(PDF) html: $(HTML) book: $(GIF-book) book.ps: $(EPS-book) DVI := $(patsubst %.sgml, %.dvi, $(BOOKS)) AUX := $(patsubst %.sgml, %.aux, $(BOOKS)) TEX := $(patsubst %.sgml, %.tex, $(BOOKS)) LOG := $(patsubst %.sgml, %.log, $(BOOKS)) OUT := $(patsubst %.sgml, %.out, $(BOOKS)) clean: -$(RM) core *~ -$(RM) $(DVI) $(AUX) $(TEX) $(LOG) $(OUT) mrproper: clean -$(RM) $(PS) $(PDF) -$(RM) -r $(HTML) -$(RM) $(HTMLTAR) %.ps : %.sgml @(which db2ps > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ exit 1) db2ps $< %.pdf : %.sgml @(which db2pdf > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ exit 1) db2pdf $< %: %.sgml @(which db2html > /dev/null 2>&1) || \ (echo "*** You need to install DocBook stylesheets ***"; \ exit 1) -$(RM) -r $@ db2html $< if [ ! -z "$(GIF-$@)" ]; then mkdir $@/figures ;cp $(GIF-$@) $@/figures; fi perl -pi -e 's/\.eps"/.gif"/' $@/*.html perl -pi -e 's/SRC="\.\.\//SRC="/' $@/*.html tar cf $@.tar $@