--- /dev/null
+#
+# Makefile for converting svg files
+# to something else: png, pdf, eps
+#
+# 10-Oct-2012 - Philippe Chauvat / Bacula Systems
+#
+INKSCAPE=inkscape
+INKSCAPE_FLAGS=-z
+INKSCAPE_OUTPUT=>>./inkscape.log 2>&1
+SVG_TO_PDF=-A
+SVG_TO_EPS=-E
+SVG_TO_PNG=-e
+PDFDIR=../pdf
+PNGDIR=../png
+EPSDIR=../eps
+
+SVGS=$(wildcard *.svg)
+PDFS=$(SVGS:.svg=.pdf)
+EPSS=$(SVGS:.svg=.eps)
+PNGS=$(SVGS:.svg=.png)
+
+vpath %.eps $(EPSDIR)
+
+first_rule:
+
+all: pdf png eps
+
+.SUFFIXES:
+.PHONY:
+.DONTCARE:
+#
+# PDF images creation
+pdf: $(PDFS)
+$(PDFS): | $(PDFDIR)
+$(PDFDIR):
+ @echo "Creating PDF images directory..."
+ @mkdir $(PDFDIR)
+ @echo "Done"
+%.pdf: %.svg
+ ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_PDF} $(PDFDIR)/$@ $< $(INKSCAPE_OUTPUT)
+#
+# EPS images creation
+vpath %.pdf $(PDFDIR)
+eps: $(EPSS)
+$(EPSS): | $(EPSDIR)
+$(EPSDIR):
+ @echo "Creating EPS images directory..."
+ @mkdir $(EPSDIR)
+ @echo "Done"
+%.eps: %.svg
+ ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_EPS} $(EPSDIR)/$@ $< $(INKSCAPE_OUTPUT)
+#
+# PNG images creation
+vpath %.png $(PNGDIR)
+png: $(PNGS)
+$(PNGS): | $(PNGDIR)
+$(PNGDIR):
+ @echo "Creating PNG images directory..."
+ @mkdir $(PNGDIR)
+ @echo "Done"
+%.png: %.svg
+ ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_PNG} $(PNGDIR)/$@ $< $(INKSCAPE_OUTPUT)
+
+clean:
+ @echo " "
+ @echo "Cleaning all generated images..."
+ @rm -rf $(PDFDIR)
+ @rm -rf $(PNGDIR)
+ @rm -rf $(EPSDIR)
+ @echo "All generated images cleaned."
+ @echo "Deleting log files"
+ @rm -f *.log
+ @echo "Everything cleaned up"
+
+distclean: clean
@echo "Covers done."
@echo ""
-external-references: destdir updateversion pdfcovers
+external-references: destdir
@echo " "
@echo "Building external references for $(DOC)"
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
@echo "$(DOC) external references done."
-pdftex: updateversion destdir pdfcovers
+pdftex: destdir
@echo ""
@echo "Making PDF manual with PDFLATEX compile..."
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
.DONTCARE:
-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 "Covers done."
@echo ""
-external-references: updateversion destdir pdfcovers
+external-references: destdir
@echo " "
@echo "Building external references for $(DOC)"
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
@echo "$(DOC) external references done."
-pdftex: updateversion destdir pdfcovers
+pdftex: destdir
@echo ""
@echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@(for L in $(LICENCES); do ln -sf $$L .; done)
@echo "Done"
-external-references: updateversion destdir pdfcovers
+external-references: destdir
@echo " "
@echo "Building external references for $(DOC)"
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
@echo "$(DOC) external references done."
-pdftex: updateversion destdir pdfcovers
+pdftex: destdir
@echo ""
@echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
DOC=misc
MAINDOC=Bacula_Miscellaneous_Guide.html
-IMAGES=@BUILD_DIR@/images
+IMAGES=../../../images
DOCDIR=`pwd`
TEXFILES=$(wildcard *tex)
MAKEFORWEB=$(DOCDIR)/web.makefile
@mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
echo "Output directories done"
-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 "Covers done."
@echo ""
-external-references: updateversion destdir pdfcovers
+external-references: destdir
@echo " "
@echo "Building external references for $(DOC)"
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
@echo "$(DOC) external references done."
-pdftex: updateversion destdir pdfcovers
+pdftex: destdir
@echo ""
@echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
#
DOC=problems
MAINDOC=Bacula_Problem_Resolution_G.html
-IMAGES=@BUILD_DIR@/images
+IMAGES=../../../images
DOCDIR=`pwd`
TEXFILES=$(wildcard *tex)
MAKEFORWEB=$(DOCDIR)/web.makefile
.PHONY:
.DONTCARE:
-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 "Covers done."
@echo ""
-external-references: updateversion destdir pdfcovers
+external-references: destdir
@echo " "
@echo "Building external references for $(DOC)"
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
@echo "$(DOC) external references done."
-pdftex: updateversion destdir pdfcovers
+pdftex: destdir
@echo ""
@echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@mkdir -p $(PDF_DEST_DIR) $(HTML_DEST_DIR)
echo "Output directories done"
-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 "Covers done."
@echo ""
-external-references: updateversion destdir pdfcovers
+external-references: destdir
@echo " "
@echo "Building external references for $(DOC)"
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
@echo "$(DOC) external references done."
-pdftex: updateversion destdir pdfcovers
+pdftex: destdir
@echo ""
@echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}\n" > graphicspolicy.tex
--- /dev/null
+#!/bin/sh
+#
+# Script file to update the Bacula version
+# It only needs to be run once for each version.
+# Alternatively, you can simply edit the file
+# manuals/version.tex and put the correct version and date
+# in that file.
+# The only thing this script does is to create the file:
+# manuals/version.tex which contains the VERSION and the DATE
+# on a single line.
+#
+BACULA_SOURCE=$HOME/bee/bacula/bacula/src
+out=/tmp/$$
+VERSION=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${BACULA_SOURCE}/version.h`
+DATE=`sed -n -e 's/^#define BDATE.*"\(.*\)"$/\1/p' ${BACULA_SOURCE}/version.h`
+echo "s%@VERSION@%${VERSION}%g" >${out}
+echo "s%@DATE@%${DATE}%g" >>${out}
+sed -f ${out} manuals/version.tex.in >manuals/version.tex
+rm -f ${out}