]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/utility/Makefile.in
Makefiles have been modified to share the patter-to-handle file which defines itself...
[bacula/docs] / docs / manuals / en / utility / Makefile.in
index 6b948c9c13a1b846697f1d23910c2db5df5557ec..d4cb0be921b5e0403c13202af7faa340ff5a98b3 100644 (file)
@@ -55,11 +55,13 @@ WWWDIR=../www-$(DOC)
 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
@@ -113,15 +115,23 @@ tex:      epscovers epsimages commonfiles
        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 " "
@@ -140,16 +150,16 @@ html:
        (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)/;\
@@ -186,7 +196,7 @@ main_configs:
 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 
@@ -203,7 +213,7 @@ clean:
        @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
@@ -215,5 +225,6 @@ webclean:
        @rm -rf $(WWWDIR)
 
 distclean:  webclean clean
+       @rm -f *.pdf
        @rm -f images.pl labels.pl internals.pl
        @rm -f Makefile version.tex