16 # Distribution variables
19 de_dirs = manuals/de/console manuals/de/developers manuals/de/main \
20 manuals/de/misc manuals/de/problems manuals/de/utility
23 en_dirs = manuals/en/console manuals/en/developers manuals/en/main \
24 manuals/en/misc manuals/en/problems manuals/en/utility
26 es_dirs = manuals/es/console manuals/es/developers manuals/es/main \
27 manuals/es/misc manuals/es/problems manuals/es/utility
29 fr_dirs = manuals/fr/console manuals/fr/developers manuals/fr/main \
30 manuals/fr/misc manuals/fr/problems manuals/fr/utility
32 image_dirs = images/svg
33 all_dirs = ${de_dirs} ${en_dirs} ${es_dirs} ${fr_dirs} ${image_dirs}
37 #-------------------------------------------------------------------------
41 all: pdf-manuals html-manuals
43 @echo "All manuals built ..."
48 pdf-manuals: templates external-references
50 @echo "Generating PDF manuals..."
51 @for I in ${en_dirs}; \
52 do (cd $$I; echo "==>Entering directory `pwd`"; \
53 $(MAKE) pdflatex || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
54 echo ""; echo ""; exit 1;)); \
57 @echo "All PDF manuals built ..."
62 html-manuals: templates external-references
64 @echo "Creating Web documentation..."
65 @for I in ${en_dirs}; \
66 do (cd $$I; echo "==>Entering directory `pwd`"; \
67 $(MAKE) web || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
68 echo ""; echo ""; exit 1;)); \
70 @(cd $(toolsdir) ; $(TRANSLATE))
71 @echo "Remove links ..."
72 find . -type l -exec rm {} \;
74 @echo "All HTML manuals built ..."
82 @echo -n "Linking templates.."
83 @mkdir -p ~/texmf/tex/latex/bsys/
84 @if [ ! -e ~/texmf/tex/latex/bsys/bsysmanual ] || [ -h ~/texmf/tex/latex/bsys/bsysmanual ]; \
86 ln -sf `pwd`/bsysmanual ~/texmf/tex/latex/bsys/;\
92 @echo -n "Building external references file..."
93 @find ${en_dirs} -mindepth 0 -maxdepth 1 -name "*tex" -exec grep -q '\label' {} \; -print| awk -F/ '{ print "\\externaldocument[" $$3 "-]{../"$$3"/"$$4"}"}'|sed -e 's/.tex//g' > `pwd`/bsysmanual/external-references.tex
94 @for I in ${en_dirs}; \
95 do (cd $$I; echo "==>Entering directory `pwd`"; \
96 $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
97 echo ""; echo ""; exit 1;)); \
99 @echo "All manuals built ..."
100 @echo "External references for all manuals built."
103 (cd bacula-web; make)
108 @for I in ${fr_dirs}; \
109 do (cd $$I; echo "==>Entering directory `pwd`"; \
110 $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
111 echo ""; echo ""; exit 1;)); \
117 @for I in ${de_dirs}; \
118 do (cd $$I; echo "==>Entering directory `pwd`"; \
119 $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
120 echo ""; echo ""; exit 1;)); \
126 @for I in ${es_dirs}; \
127 do (cd $$I; echo "==>Entering directory `pwd`"; \
128 $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
129 echo ""; echo ""; exit 1;)); \
133 configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
135 ${RMF} -f config.cache config.log config.out config.status src/config.h
136 autoconf --prepend-include=$(srcdir)/autoconf \
137 autoconf/configure.in > configure
140 Makefile: Makefile.in
142 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
145 $(SHELL) config.status
148 SEDREPLACE = -e 's%@BACULA_VERSION@%$(VERSION)%g;'\
149 -e 's%@BACULA_LSMDATE@%$(LSMDATE)%g;'\
150 -e 's%@BACULA_DATE@%$(DATE)%g;'\
151 -e 's%@BACULA_MAINTEMAIL@%$(MAINTEMAIL)%g;'\
152 -e 's%@BACULA_MAINT@%$(MAINT)%g;'\
153 -e 's%@BACULA_WEBPAGE@%$(WEBPAGE)%g;'\
154 -e 's%@BACULA_WEBMAINTEMAIL@%$(WEBMAINTEMAIL)%g;'\
155 -e 's%@BACULA_WEBMAINT@%$(WEBMAINT)%g;'\
156 -e 's%@BACULA_FTPSITENAME@%$(FTPSITENAME)%g;'\
157 -e 's%@BACULA_FTPSITEDIR@%$(FTPSITEDIR)%g;'
160 $(basedir)/$(VERNAME).lsm: LSM.in $(srcdir)/../autoconf/Make.common.in $(srcdir)/../src/version.h
161 $(SED) $(SEDREPLACE) < $(srcdir)/LSM.in > $@
164 $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
165 (cd bacula-web; make clean)
166 @for I in ${all_dirs}; \
167 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
174 $(RMF) -r CVS html-manual/CVS home-page/CVS techlogs/CVS
175 $(RMF) -rf autom4te.cache bacula-doc-* config.log config.out
176 $(RMF) -f config.status kernsconfig
177 (cd bacula-web; make distclean)
178 @for I in ${all_dirs}; \
179 do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
188 # $(INSTALL_DATA) bacula.1 $(DESTDIR)$(mandir)/$(manprefix)bacula.$(manext)
191 # -cd $(mandir); $(RMF) $(manprefix)bacula.$(manext)