DOCDIR=../${DOC}
TEXFILES=$(wildcard *.tex)
WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
-
+PDFLATEX=pdflatex
+PDFLATEXOPTIONS=-interaction=batchmode
+MAKEFORWEB=$(DOCDIR)/web.makefile
first_rule: all
-all: tex pdflatex web mini-clean
+all: pdflatex web mini-clean
.SUFFIXES: .tex .html
makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
latex -interaction=batchmode ${DOC}.tex
-
-pdflatex: pdfcovers pdfimages commonfiles
+external-references: pdfcovers pdfimages commonfiles
+ @echo " "
+ @echo "Building external references for $(DOC)"
@ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
- @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
- ${DOC}i-console.tex ${DOC}i-general.tex
- pdflatex -interaction=batchmode ${DOC}.tex
- makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
- pdflatex -interaction=batchmode ${DOC}.tex
- pdflatex -interaction=batchmode ${DOC}.tex
+ @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
+ @echo "$(DOC) external references done."
+
+
+pdflatex: external-references
+ @echo " "
+ @echo " Generating the PDF version of $(DOC)"
+ @echo " building indexes"
+ @makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
+ @echo " compiling..."
+ @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
+ @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
+ @echo "$(DOC).pdf generated."
html:
@echo " "
(cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
@echo "Done making html"
-web: clean
+web: mini-clean
@echo "Making web"
@rm -rf $(WWWDIR)
@mkdir -p $(WWWDIR)
@echo -"Creating tex files..."
@(for F in $(TEXFILES) ;\
do \
- cat $$F | sed -e 's/lstlisting/verbatim/g;s/lstinline/verb/g;s/\\lstset.*//g;s/bsysimage.{\(.*\)}{.*}{.*}/includegraphics{\1}/g;s/\\input{head.*//g;s/bsysmanual/book/g;s/bsysitemize/itemize/g;s/\\listoffigures//g;s/\\listoftables//g' > $(WWWDIR)/$$F ;\
+ cat $$F | sed -f ../pattern-to-handle > $(WWWDIR)/$$F ; \
done)
- @ln -sf $(DOCDIR)/Makefile.web $(WWWDIR)/Makefile
+ @ln -sf $(MAKEFORWEB) $(WWWDIR)/Makefile
@(for F in $(WEBFILESTOLINK);\
do \
ln -sf $$F $(WWWDIR)/;\
mini-clean:
@rm -f 1 2 3 *.tex~
@rm -f *.gif *.jpg *.eps
- @rm -f *.aux *.cp *.fn *.ky *.log *.pg
+ @rm -f *.cp *.fn *.ky *.log *.pg
@rm -f *.backup *.ilg *.lof *.lot
@rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
@rm -f *.dnd *.old *.out
@find . -type l -name "*.tex" -exec rm {} \;
@rm -f 1 2 3 *.tex~
@rm -f *.png *.gif *.jpg *.eps
- @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
+ @rm -f *.aux *.cp *.fn *.ky *.log *.pg
@rm -f *.html *.backup *.ps *.dvi *.ilg *.lof *.lot
@rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
@rm -f *.dnd imagename_translations
@rm -rf $(WWWDIR)
distclean: webclean clean
+ @rm -f *.pdf
@rm -f images.pl labels.pl internals.pl
@rm -f Makefile version.tex