File: Makefile

package info (click to toggle)
bacula-doc 9.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 235,288 kB
  • sloc: makefile: 1,820; perl: 937; sh: 218
file content (184 lines) | stat: -rw-r--r-- 4,864 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#
#
#  Makefile for LaTeX  
#
# To build everything do
#    make tex
#    make web
#    make html
#    make dvipdf
#
# or simply
#
#    make
#
# for rapid development do:
#    make tex
#    make show
#
#
# If you are having problems getting "make" to work, debugging it is
#  easier if can see the output from latex, which is normally redirected
#  to /dev/null.  To see it, do the following:
#
#   cd docs/manual
#   make tex
#   latex bacula.tex
#
#  typically the latex command will stop indicating the error (e.g. a
#  missing \ in front of a _ or a missing { or ] ...
#
#  The following characters must be preceded by a backslash
#    to be entered as printable characters:
# 
#    # $ % & ~ _ ^ \ { }
#
DOC=problems
MAINDOC=Bacula_Problem_Resolution_G.html
IMAGES=../../../images
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 -halt-on-error --output-directory $(PDF_DEST_DIR)

first_rule: all

all: pdftex web mini-clean

.SUFFIXES:     .tex .html
.PHONY:
.DONTCARE:

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:
	@echo "Making version `cat version.tex`"
	@echo -n "Linking shared files..."
	@(for L in $(LICENCES); do ln -sf $$L .; done)
	@echo "Done"

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: destdir
	@echo " "
	@echo "Building external references for $(DOC)"
	@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}" > graphicspolicy.tex
	@export TEXINPUTS=.:../../../latex//: ; $(LATEX_TO_PDF) $(DOC)
	@rm -f $(PDF_DEST_DIR)/$(DOC).pdf
	@echo "$(DOC) external references done."

pdftex: destdir
	@echo ""
	@echo "Making PDF manual with $(LATEX_TO_PDF)compile..."
	@echo "\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.eps}" > 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

main_configs:
	pic2graph -density 100 <main_configs.pic >main_configs.png

mini-clean:
	@rm -f 1 2 3 *.tex~
	@rm -f *.gif *.jpg *.eps
	@rm -f *.aux *.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 
	@rm -f ${DOC}/*.gif ${DOC}/*.jpg ${DOC}/*.eps
	@rm -f ${DOC}/*.aux ${DOC}/*.cp ${DOC}/*.fn ${DOC}/*.ky ${DOC}/*.log ${DOC}/*.pg
	@rm -f ${DOC}/*.backup ${DOC}/*.ilg ${DOC}/*.lof ${DOC}/*.lot
	@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
	@rm -f *.html *.backup *.pdf *.ps *.dvi *.ilg *.lof *.lot
	@rm -f *.cdx *.cnd *.ddx *.ddn *.fdx *.fnd *.ind *.sdx *.snd
	@rm -f *.dnd imagename_translations
	@rm -f *.old WARNINGS *.out *.toc *.idx
	@rm -f images.pl labels.pl internals.pl
	@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 -rf $(WWW_BUILD_DIR)
	@rm -rf $(HTML_DEST_DIR)