basedir = ..
topdir = ..
-thisdir = doc
+thisdir = docs
#
# Distribution variables
#
+de_dirs = manuals/de/console manuals/de/developers manuals/de/main \
+ manuals/de/misc manuals/de/problems manuals/de/utility
+
+
+en_dirs = manuals/en/console manuals/en/developers manuals/en/main \
+ manuals/en/misc manuals/en/problems manuals/en/utility
+
+es_dirs = manuals/es/console manuals/es/developers manuals/es/main \
+ manuals/es/misc manuals/es/problems manuals/es/utility
+
+fr_dirs = manuals/fr/console manuals/fr/developers manuals/fr/main \
+ manuals/fr/misc manuals/fr/problems manuals/fr/utility
+
+all_dirs = ${de_dirs} ${en_dirs} ${es_dirs} ${fr_dirs}
DIST = Makefile.in
+LANGUAGES= en fr de es
#-------------------------------------------------------------------------
-all:
- (cd manual; make)
- (cd developers; make)
+#en: pdftex
+
+all: pdftex web clean
+# @for I in ${en_dirs}; \
+# do (cd $$I; echo "==>Entering directory `pwd`"; \
+# $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+# echo ""; echo ""; exit 1;)); \
+# done
+# @echo "All manuals built ..."
+
+
+external-references:
+ @echo " "
+ @echo -n "Building external references file..."
+ @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`/latex/external-references.tex
+ @for I in ${en_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+ @echo "External references for all manuals built."
+
+pdftex: external-references
+ @for I in ${en_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+ @echo "All manuals built ..."
+
+web:
+ @for I in ${en_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+ @(cd tools ; ./htmls.sh)
+ @cp ./images/png/borg-logo.png manuals/en/pdf-and-html/images
+ @cp ./images/png/borg-next.png manuals/en/pdf-and-html/images/next.png
+ @cp ./images/png/borg-next_g.png manuals/en/pdf-and-html/images/next_g.png
+ @cp ./images/png/borg-previous.png manuals/en/pdf-and-html/images/prev.png
+ @cp ./images/png/borg-previous_g.png manuals/en/pdf-and-html/images/prev_g.png
+ @cp ./images/png/borg-up.png manuals/en/pdf-and-html/images/up.png
+ @cp ./images/png/borg-up_g.png manuals/en/pdf-and-html/images/up_g.png
+ @cp ./images/png/borg-contents.png manuals/en/pdf-and-html/images/contents.png
+ @cp ./images/png/borg-index.png manuals/en/pdf-and-html/images/index.png
+ @echo "All manuals built ..."
+
+
+bacula-web:
(cd bacula-web; make)
+fr: french
+
+french:
+ @for I in ${fr_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+
+de: german
-configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
+german:
+ @for I in ${de_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+
+es: spanish
+
+spanish:
+ @for I in ${es_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+
+
+configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h
cd $(srcdir);
${RMF} -f config.cache config.log config.out config.status src/config.h
autoconf --prepend-include=$(srcdir)/autoconf \
- autoconf/configure.in > configure
+ autoconf/configure.in > configure
chmod 755 configure
Makefile: Makefile.in
clean:
$(RMF) *~ 1 2 3 bacula-doc*.tar.gz
- (cd manual; make clean)
- (cd manual-de; make clean)
- (cd manual-fr; make clean)
(cd bacula-web; make clean)
+ find . -type l -exec rm {} \;
+ @for I in ${all_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
+
+mini-clean:
+ $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
+ (cd bacula-web; make clean)
+ find . -type l -exec rm {} \;
+ @for I in ${all_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
realclean: clean
-distclean:
+distclean: clean
$(RMF) Makefile
$(RMF) -r CVS html-manual/CVS home-page/CVS techlogs/CVS
$(RMF) -rf autom4te.cache bacula-doc-* config.log config.out
$(RMF) -f config.status kernsconfig
- (cd manual; make distclean)
- (cd manual-de; make distclean)
- (cd manual-fr; make distclean)
(cd bacula-web; make distclean)
+ @for I in ${all_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
+ @echo "Removing the HTML directories..."
+ @for L in $(LANGUAGES) ; \
+ do rm -rf manuals/$$L/pdf-and-html ; done
+ @echo "HTML directories removed."
+ @echo "Cleaning the latex directory..."
+ @rm -f latex/external-references
+ @echo "latex directory cleaned up"
devclean: