#
-# $Id$
-#
@MCOMMON@
srcdir = @srcdir@
basedir = ..
topdir = ..
-thisdir = doc
+thisdir = docs
+toolsdir = ./tools
+TRANSLATE=./htmls.sh
#
# 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
+
+image_dirs = images/svg
+all_dirs = ${de_dirs} ${en_dirs} ${es_dirs} ${fr_dirs} ${image_dirs}
DIST = Makefile.in
#-------------------------------------------------------------------------
-all:
- (cd manual; make)
- (cd developers; make)
+en: all
+all: pdf-manuals html-manuals
+ @echo ""
+ @echo "All manuals built ..."
+ @echo ""
+ @echo ""
+ @echo ""
-configure: autoconf/configure.in autoconf/aclocal.m4 autoconf/acconfig.h autoconf/config.h.in
+pdf-manuals: templates external-references
+ @echo " "
+ @echo "Generating PDF manuals..."
+ @for I in ${en_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) pdflatex || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+ @echo ""
+ @echo "All PDF manuals built ..."
+ @echo ""
+ @echo ""
+ @echo ""
+
+html-manuals: templates external-references
+ @echo " "
+ @echo "Creating Web documentation..."
+ @for I in ${en_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+ $(MAKE) web || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+ @(cd $(toolsdir) ; $(TRANSLATE))
+ @echo "Remove links ..."
+ find . -type l -exec rm {} \;
+ @echo ""
+ @echo "All HTML manuals built ..."
+ @echo ""
+ @echo ""
+ @echo ""
+
+
+templates:
+ @echo " "
+ @echo -n "Linking templates.."
+ @mkdir -p ~/texmf/tex/latex/bsys/
+ @if [ ! -e ~/texmf/tex/latex/bsys/bsysmanual ] || [ -h ~/texmf/tex/latex/bsys/bsysmanual ]; \
+ then\
+ ln -sf `pwd`/bsysmanual ~/texmf/tex/latex/bsys/;\
+ fi
+ @echo "Done"
+
+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`/bsysmanual/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 "All manuals built ..."
+ @echo "External references for 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
+
+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
$(SED) $(SEDREPLACE) < $(srcdir)/LSM.in > $@
clean:
- $(RMF) *~ 1 2 3
- (cd manual; make clean)
- (cd manual-de; make clean)
- (cd manual-fr; make clean)
+ $(RMF) *~ 1 2 3 bacula-doc*.tar.gz
+ (cd bacula-web; make clean)
+ @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 bacula-web; make distclean)
+ @for I in ${all_dirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
+
devclean:
$(RMF) Makefile
uninstall:
# -cd $(mandir); $(RMF) $(manprefix)bacula.$(manext)
-
-distribution:
- rm -rf bacula-doc-*
- mkdir -p bacula-doc-$(VERSION)
- cp -ap manual/bacula bacula-doc-$(VERSION)/web-manual
- mkdir -p bacula-doc-$(VERSION)/html-manual
- cp -p manual/bacula.html manual/*.png manual/*.css bacula-doc-$(VERSION)/html-manual/
- cp -p manual/bacula.pdf bacula-doc-$(VERSION)/
- cp -p developers/developers.pdf bacula-doc-$(VERSION)/
- cp -p $(BACULASRC)/kernstodo bacula-doc-$(VERSION)/
- cp -p $(BACULASRC)/ReleaseNotes bacula-doc-$(VERSION)/
- cp -p $(BACULASRC)/projects bacula-doc-$(VERSION)/
- tar cvfz bacula-doc-$(VERSION).tar.gz bacula-doc-$(VERSION)
- rm -rf bacula-doc-$(VERSION)
- @echo " "
- @echo "Distribution document is in: bacula-doc-$(VERSION).tar.gz"
- @echo " "