From dafbcee2bfb68e345e23aa0a030f5b8d650c683c Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 7 Mar 2014 22:29:56 +0100 Subject: [PATCH 1/1] Tweaks to hopefully make it work --- docs/images/svg/Makefile | 75 +++++++++++++++++++++++++++++ docs/manuals/en/console/Makefile | 4 +- docs/manuals/en/developers/Makefile | 10 +--- docs/manuals/en/main/Makefile | 4 +- docs/manuals/en/misc/Makefile | 12 ++--- docs/manuals/en/problems/Makefile | 12 ++--- docs/manuals/en/utility/Makefile | 10 +--- docs/update_version | 19 ++++++++ 8 files changed, 108 insertions(+), 38 deletions(-) create mode 100644 docs/images/svg/Makefile create mode 100755 docs/update_version diff --git a/docs/images/svg/Makefile b/docs/images/svg/Makefile new file mode 100644 index 00000000..2a9eb57e --- /dev/null +++ b/docs/images/svg/Makefile @@ -0,0 +1,75 @@ +# +# 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 diff --git a/docs/manuals/en/console/Makefile b/docs/manuals/en/console/Makefile index 2f8e5917..6055d3ec 100644 --- a/docs/manuals/en/console/Makefile +++ b/docs/manuals/en/console/Makefile @@ -78,7 +78,7 @@ pdfcovers: @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 @@ -86,7 +86,7 @@ external-references: destdir updateversion pdfcovers @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 diff --git a/docs/manuals/en/developers/Makefile b/docs/manuals/en/developers/Makefile index 289b3a79..360c5aa0 100644 --- a/docs/manuals/en/developers/Makefile +++ b/docs/manuals/en/developers/Makefile @@ -46,12 +46,6 @@ all: pdftex web mini-clean .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) @@ -102,7 +96,7 @@ pdfcovers: @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 @@ -110,7 +104,7 @@ external-references: updateversion destdir pdfcovers @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 diff --git a/docs/manuals/en/main/Makefile b/docs/manuals/en/main/Makefile index dc988772..2097906f 100644 --- a/docs/manuals/en/main/Makefile +++ b/docs/manuals/en/main/Makefile @@ -111,7 +111,7 @@ commonfiles: @(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 @@ -119,7 +119,7 @@ external-references: updateversion destdir pdfcovers @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 diff --git a/docs/manuals/en/misc/Makefile b/docs/manuals/en/misc/Makefile index 58be8110..3ae5bc3c 100644 --- a/docs/manuals/en/misc/Makefile +++ b/docs/manuals/en/misc/Makefile @@ -36,7 +36,7 @@ DOC=misc MAINDOC=Bacula_Miscellaneous_Guide.html -IMAGES=@BUILD_DIR@/images +IMAGES=../../../images DOCDIR=`pwd` TEXFILES=$(wildcard *tex) MAKEFORWEB=$(DOCDIR)/web.makefile @@ -72,12 +72,6 @@ destdir: @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) @@ -115,7 +109,7 @@ pdfcovers: @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 @@ -123,7 +117,7 @@ external-references: updateversion destdir pdfcovers @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 diff --git a/docs/manuals/en/problems/Makefile b/docs/manuals/en/problems/Makefile index 8128c5fc..fc694ddf 100644 --- a/docs/manuals/en/problems/Makefile +++ b/docs/manuals/en/problems/Makefile @@ -35,7 +35,7 @@ # DOC=problems MAINDOC=Bacula_Problem_Resolution_G.html -IMAGES=@BUILD_DIR@/images +IMAGES=../../../images DOCDIR=`pwd` TEXFILES=$(wildcard *tex) MAKEFORWEB=$(DOCDIR)/web.makefile @@ -64,12 +64,6 @@ all: pdftex web mini-clean .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) @@ -113,7 +107,7 @@ pdfcovers: @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 @@ -121,7 +115,7 @@ external-references: updateversion destdir pdfcovers @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 diff --git a/docs/manuals/en/utility/Makefile b/docs/manuals/en/utility/Makefile index bb068ef5..775d9a19 100644 --- a/docs/manuals/en/utility/Makefile +++ b/docs/manuals/en/utility/Makefile @@ -71,12 +71,6 @@ destdir: @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) @@ -114,7 +108,7 @@ pdfcovers: @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 @@ -122,7 +116,7 @@ external-references: updateversion destdir pdfcovers @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 diff --git a/docs/update_version b/docs/update_version new file mode 100755 index 00000000..db455eda --- /dev/null +++ b/docs/update_version @@ -0,0 +1,19 @@ +#!/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} -- 2.39.2