# Distribution variables
#
-de_dirs = manuals/de/catalog manuals/de/concepts manuals/de/console \
- manuals/de/developers manuals/de/install manuals/de/problems \
- manuals/de/utility
+de_dirs = manuals/de/console manuals/de/developers manuals/de/main \
+ manuals/de/misc manuals/de/problems manuals/de/utility
-en_dirs = manuals/en/catalog manuals/en/concepts manuals/en/console \
- manuals/en/developers manuals/en/install manuals/en/problems \
- manuals/en/utility
+en_dirs = manuals/en/console manuals/en/developers manuals/en/main \
+ manuals/en/misc manuals/en/problems manuals/en/utility
-fr_dirs = manuals/fr/catalog manuals/fr/concepts manuals/fr/console \
- manuals/fr/developers manuals/fr/install manuals/fr/problems \
- manuals/fr/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:
+#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 "";)); \
+ echo ""; echo ""; exit 1;)); \
done
- (cd bacula-web; make)
+ @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) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
- echo ""; echo "";)); \
+ $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
done
+de: german
+
german:
@for I in ${de_dirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; \
- $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
- echo ""; echo "";)); \
+ $(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
clean:
$(RMF) *~ 1 2 3 bacula-doc*.tar.gz
(cd bacula-web; make clean)
- @for I in ${en_dirs} ${fr_dirs} ${de_dirs}; \
+ 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
$(RMF) -rf autom4te.cache bacula-doc-* config.log config.out
$(RMF) -f config.status kernsconfig
(cd bacula-web; make distclean)
- @for I in ${en_dirs} ${fr_dirs} ${de_dirs}; \
+ @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: