]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/problems/Makefile.in
Makefiles have been modified to share the patter-to-handle file which defines itself...
[bacula/docs] / docs / manuals / en / problems / Makefile.in
index d2557754136a92833bc21e02a1d339716b679856..2d25fe60633d5bb81aabd5468fa25fb184dbf3b7 100644 (file)
 
 IMAGES=../../../images
 
+MANUALSDIR=../..
 DOC=problems
 MAINDOC=Bacula_Problem_Resolution_G.html
+BSYSMANUALDIR=../../../bsysmanual
+COVERSDIR=../../../covers
+PDFCOVERSDIR=$(COVERSDIR)/pdf
+SVGCOVERSDIR=$(COVERSDIR)/svg
+EPSCOVERSDIR=$(COVERSDIR)/eps
+LICENSESDIR=$(MANUALSDIR)/licences
+COVERNAME=coverpage-problems
+BSYSMANNAME=bsysmanual-coverpagebackground
+LICENCES=$(wildcard $(LICENSESDIR)/*.tex)
+BSYSCOMPILERFILE=bsys-compiler-mode.tex
+PDFCOMPILERFILE=$(MANUALSDIR)/bsys-pdflatex-mode.tex
+TEXCOMPILERFILE=$(MANUALSDIR)/bsys-latex-mode.tex
+WEBCOMPILERFILE=$(MANUALSDIR)/bsys-web-mode.tex
+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 web dvipdf mini-clean
+all: pdflatex web mini-clean
 
 .SUFFIXES:     .tex .html
 .PHONY:
 .DONTCARE:
 
-
-tex:
-       @./update_version
+pdfcovers:
+       @echo -n "Linking coverpage and background PDF format..."
+       @(cd $(SVGCOVERSDIR) ; make pdf)
+       @ln -sf `pwd`/${PDFCOVERSDIR}/${COVERNAME}.pdf `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
+       @echo "Done."
+
+pdfimages: 
+       @echo "Generating PDF images..."
+       @(cd ${IMAGES}/svg ; make pdf)
+       @echo "Done."
+
+pngimages:
+       @echo "Generating PNG images..."
+       @(cd ${IMAGES}/svg ; make png)
+       @echo "Done."
+
+epsimages:
+       @echo "Generating EPS images..."
+       @(cd ${IMAGES}/svg ; make eps)
+       @rm -rf ${IMAGES}/png
+       @rm -rf ${IMAGES}/pdf
+       @echo "Done."
+
+epscovers:
+       @echo -n "Linking coverpage and background EPS format..."
+       @(cd $(SVGCOVERSDIR) ; make eps)
+       @ln -sf `pwd`/${EPSCOVERSDIR}/${COVERNAME}.eps `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.eps
+       @rm -f `pwd`/${BSYSMANUALDIR}/${BSYSMANNAME}.pdf
+       @echo "Done."
+
+commonfiles:
+       @../../update_version
        @echo "Making version `cat version.tex`"
-       @cp -fp ${IMAGES}/hires/*.eps .
+       @echo -n "Linking shared files..."
+       @(for L in $(LICENCES); do ln -sf $$L .; done)
+       @echo "Done"
+
+tex: epscovers epsimages commonfiles
+       @ln -sf $(TEXCOMPILERFILE) $(BSYSCOMPILERFILE)
        @touch ${DOC}i-dir.tex ${DOC}i-fd.tex ${DOC}i-sd.tex \
             ${DOC}i-console.tex ${DOC}i-general.tex
        latex -interaction=batchmode ${DOC}.tex
        makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null
        latex -interaction=batchmode ${DOC}.tex
 
-pdf:
-       @echo "Making pdfm"
-       @cp -fp ${IMAGES}/hires/*.eps .
-       dvipdfm -p a4 ${DOC}.dvi
+external-references: pdfcovers pdfimages commonfiles
+       @echo " "
+       @echo "Building external references for $(DOC)"
+       @ln -sf $(PDFCOMPILERFILE) $(BSYSCOMPILERFILE)
+       @$(PDFLATEX) $(PDFLATEXOPTIONS) ${DOC}.tex
+       @echo "$(DOC) external references done."
 
-dvipdf:
-       @echo "Making dvi to pdf"
-       @cp -fp ${IMAGES}/hires/*.eps .
-       dvipdf ${DOC}.dvi ${DOC}.pdf
+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 " "
@@ -84,23 +146,40 @@ html:
        (cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
        @echo "Done making html"
 
-web:
+web: mini-clean
        @echo "Making web"
-       @rm -rf ${DOC}
-       @mkdir -p ${DOC}
-       @cp -fp ${IMAGES}/*.eps .
-       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
-       @rm -f ${DOC}/xp-*.png
-       @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
-       latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \
-               -toc_stars -contents_in_nav -init_file latex2html-init.pl \
-               -no_antialias -no_antialias_text \
-               -white -notransparent ${DOC} >tex.out 2>&1
-       @(if [ -f imagename_translations ] ; then \
-           ./translate_images.pl --from_meaningful_names ${DOC}.html; \
-        fi)
-       @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
+       @rm -rf $(WWWDIR)
+       @mkdir -p $(WWWDIR)
+       @echo -"Creating tex files..."
+       @(for F in $(TEXFILES) ;\
+       do \
+       cat $$F | sed -f ../pattern-to-handle > $(WWWDIR)/$$F ; \
+       done)
+       @ln -sf $(MAKEFORWEB) $(WWWDIR)/Makefile
+       @(for F in $(WEBFILESTOLINK);\
+       do \
+       ln -sf $$F $(WWWDIR)/;\
+       done)
+       (cd $(WWWDIR) ; make )
        @echo "Done making web"
+# web:
+#      @echo "Making web"
+#      @rm -rf ${DOC}
+#      @mkdir -p ${DOC}
+#      @cp -fp ${IMAGES}/*.eps .
+#      @rm -f next.eps next.png prev.eps prev.png up.eps up.png
+#      @rm -f ${DOC}/xp-*.png
+#      @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
+#      latex2html -split 3 -local_icons -t "Bacula Problem Resolution Guide" -long_titles 4 \
+#              -toc_stars -contents_in_nav -init_file latex2html-init.pl \
+#              -no_antialias -no_antialias_text \
+#              -white -notransparent ${DOC} >tex.out 2>&1
+#      @(if [ -f imagename_translations ] ; then \
+#          ./translate_images.pl --from_meaningful_names ${DOC}.html; \
+#       fi)
+#      @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
+#      @echo "Done making web"
+
 show:
        xdvi ${DOC}
 
@@ -113,7 +192,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 
@@ -127,9 +206,11 @@ mini-clean:
 
 
 clean:
+       @find . -type f -name "${DOC}.mtc*" -exec rm {} \;
+       @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
@@ -137,7 +218,10 @@ clean:
        @rm -f ${DOC}i-*.tex
        @rm -rf ${DOC}
 
+webclean:
+       @rm -rf $(WWWDIR)
 
-distclean: clean
+distclean:  webclean clean
+       @rm -f *.pdf
        @rm -f images.pl labels.pl internals.pl
        @rm -f Makefile version.tex