]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manuals/en/developers/Makefile.in
Add manuals/bacula.sty
[bacula/docs] / docs / manuals / en / developers / Makefile.in
index 0960d6f48fc4cc48e318f6b72a271a5ef4b11f89..796445d08c60e3df21c3f5f97defbb50dac27a3a 100644 (file)
 #    make
 #
 
-IMAGES=../../../images
+IMAGES=@BUILD_DIR@/images
 
 DOC=developers
+MAINDOC=Developer_s_Guide.html
+DOCDIR=`pwd`
+TEXFILES=$(wildcard *tex)
+MAKEFORWEB=$(DOCDIR)/web.makefile
+WEBFILESTOLINK=$(DOCDIR)/latex2html-init.pl $(DOCDIR)/bacula.sty $(DOCDIR)/translate_images.pl
+#
+# Main directory where to find all the documentation
+DESTDIR=../pdf-and-html
+#
+# Location of documentation in PDF
+PDF_DEST_DIR=$(DESTDIR)/$(DOC)
+#
+# Location of HTML documentation
+HTML_DEST_DIR=$(DESTDIR)/$(DOC)
+#
+# Temporary directory to translate tex to HTML
+WWW_BUILD_DIR=$(DESTDIR)/www-$(DOC)
+#
+# LATEX compiler
+LATEX_TO_PDF= pdflatex --output-directory $(PDF_DEST_DIR)
 
 first_rule: all
 
-all: tex web dvipdf mini-clean
+all: pdftex web mini-clean
 
 .SUFFIXES:     .tex .html
 .PHONY:
 .DONTCARE:
 
 
-tex:
-       @cp -fp ${IMAGES}/hires/*.eps .
-       touch ${DOC}.idx ${DOC}i-general.tex
-       -latex -interaction=batchmode ${DOC}.tex
-       makeindex ${DOC}.idx >/dev/null 2>/dev/null
-       -latex -interaction=batchmode ${DOC}.tex
-
-pdf:
-       @echo "Making ${DOC} pdf"
-       @cp -fp ${IMAGES}/hires/*.eps .
-       dvipdf ${DOC}.dvi ${DOC}.pdf
-       @rm -f *.eps *.old
-
-dvipdf:
-       @echo "Making ${DOC} pdfm"
-       @cp -fp ${IMAGES}/hires/*.eps .
-       dvipdfm -p a4 ${DOC}.dvi >tex.out 2>&1
-
-html:
-       @echo "Making ${DOC} html"
-       @cp -fp ${IMAGES}/*.eps .
-       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
-       @touch ${DOC}.html
-       @(if [ -f imagename_translations ] ; then \
-           ./translate_images.pl --from_meaningful_names ${DOC}.html; \
-        fi)
-       latex2html -white -no_subdir -split 0 -toc_stars -white -notransparent \
-               ${DOC} >tex.out 2>&1
-       ./translate_images.pl --to_meaningful_names ${DOC}.html
-       @rm -f *.eps *.gif *.jpg *.old
-
-web:
-       @echo "Making ${DOC} web"
-       @mkdir -p ${DOC}
-       @rm -f ${DOC}/*
-       @cp -fp ${IMAGES}/*.eps .
-       @rm -f next.eps next.png prev.eps prev.png up.eps up.png
-       @cp -fp ${IMAGES}/*.eps ${IMAGES}/*.png ${DOC}/
-       @rm -f ${DOC}/next.eps ${DOC}/next.png ${DOC}/prev.eps ${DOC}/prev.png ${DOC}/up.eps ${DOC}/up.png
-       @(if [ -f ${DOC}/imagename_translations ] ; then \
-          ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html; \
-        fi)
-       @rm -rf ${DOC}/*.html
-       latex2html -split 4 -local_icons -t "Developer's Guide" -long_titles 4 \
-               -contents_in_nav -toc_stars -white -notransparent ${DOC} >tex.out 2>&1
-       ./translate_images.pl --to_meaningful_names ${DOC}/Developer*Guide.html
-       @cp -f ${DOC}/Developers_Guide.html ${DOC}/index.html
-       @rm -f *.eps *.gif *.jpg ${DOC}/*.eps  *.old 
-       @rm -f ${DOC}/idle.png
-       @rm -f ${DOC}/win32-*.png ${DOC}/wx-console*.png ${DOC}/xp-*.png
-       @rm -f ${DOC}/*.pl ${DOC}/*.log ${DOC}/*.aux ${DOC}/*.idx
-       @rm -f ${DOC}/*.out WARNINGS
+updateversion:
+       @/bin/bash ../../update_version
+
+destdir:
+       @echo
+       @echo "Making output directories..."
+       @mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
+       echo "Output directories done"
+
+pdfcovers:
+       @echo ""
+       @echo "Making covers for $(DOC)"
+       @(cd $(IMAGES)/svg ; make pdf)
+       @echo "Covers done."
+       @echo ""
+
+external-references: updateversion destdir pdfcovers
+       @echo " "
+       @echo "Building external references for $(DOC)"
+       @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
+       @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC)
+       @rm -f $(PDF_DEST_DIR)/$(DOC).pdf
+       @echo "$(DOC) external references done."
+
+pdftex: updateversion destdir pdfcovers
+       @echo ""
+       @echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
+       @echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
+       @export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC); makeindex ${DOC}.idx -o ${DOC}.ind 2>/dev/null ; $(LATEX_TO_PDF) $(DOC); $(LATEX_TO_PDF) $(DOC)
+       @echo "Done"
+
+
+web: mini-clean
+       @echo "Making web"
+       @rm -rf $(WWW_BUILD_DIR)
+       @mkdir -p $(WWW_BUILD_DIR)
+       @echo "Adapting $(DOC) tex files for HTML documentation..."
+       @(for F in $(TEXFILES) ;\
+       do \
+       cat $$F | sed -f ../pattern-to-handle > $(WWW_BUILD_DIR)/$$F ; \
+       done)
+       @ln -sf $(MAKEFORWEB) $(WWW_BUILD_DIR)/Makefile
+       @(for F in $(WEBFILESTOLINK);\
+       do \
+       ln -sf $$F $(WWW_BUILD_DIR)/;\
+       done)
+       (cd $(WWW_BUILD_DIR) ; make )
+       @echo "Done making web"
+
+
+show:
+       evince $(PDF_DEST_DIR)/${DOC}.pdf
 
 texcheck:
        ./check_tex.pl ${DOC}.tex
@@ -98,8 +118,10 @@ mini-clean:
        @rm -f ${DOC}/*.cdx ${DOC}/*.cnd ${DOC}/*.ddx ${DOC}/*.ddn ${DOC}/*.fdx ${DOC}/*.fnd ${DOC}/*.ind ${DOC}/*.sdx ${DOC}/*.snd
        @rm -f ${DOC}/*.dnd ${DOC}/*.old ${DOC}/*.out
        @rm -f ${DOC}/WARNINGS
+       @rm -rf ../www-$(DOC)
 
 clean:
+       @rm -f graphicspolicy.tex
        @rm -f 1 2 3
        @rm -f *.png *.gif *.jpg *.eps
        @rm -f *.pdf *.aux *.cp *.fn *.ky *.log *.pg
@@ -108,11 +130,13 @@ clean:
        @rm -f *.dnd imagename_translations
        @rm -f *.old WARNINGS *.out *.toc *.idx
        @rm -f images.pl labels.pl internals.pl
-       @rm -rf ${DOC}
        @rm -f images.tex ${DOC}i.tex
        @rm -f ${DOC}i-*.tex
-
+       @rm -rf $(WWW_BUILD_DIR)
 
 distclean:  clean
        @rm -f ${DOC}.html ${DOC}.pdf
        @rm -f Makefile version.tex
+       @rm -rf $(WWW_BUILD_DIR)
+       @rm -rf $(HTML_DEST_DIR)
+