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
first_rule: all
-all: tex pdflatex mini-clean
+all: tex pdflatex web mini-clean
.SUFFIXES: .tex .html
.PHONY:
(cd ${DOC}; for i in *.png ; do cp -fp ../${IMAGES}/$${i} . 2>/dev/null; done)
@echo "Done making html"
-web:
+web: 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 Miscellaneous 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}/${MAINDOC}; \
- 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 -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 ;\
+ done)
+ @ln -sf $(DOCDIR)/Makefile.web $(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 Miscellaneous 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}/${MAINDOC}; \
+# fi)
+# @cp -f ${DOC}/${MAINDOC} ${DOC}/index.html
+# @echo "Done making web"
+
show:
xdvi ${DOC}
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 ${DOC}i-*.tex
@rm -rf ${DOC}
+webclean:
+ @rm -rf $(WWWDIR)
-distclean: clean
+distclean: webclean clean
@rm -f images.pl labels.pl internals.pl
@rm -f Makefile version.tex