# @configure_input@
-# $Id: Makefile.in,v 1.23 2006-01-11 01:01:46 thib Exp $
+# $Id: Makefile.in,v 1.24 2006-02-05 19:26:40 thib Exp $
# The following should not be edited manually (use configure options)
# If you must do it, BEWARE: some of the following is also defined
SGMLFILES = fcron-doc.sgml readme.sgml relnotes.sgml changes.sgml faq.sgml thanks.sgml todo.sgml fcron.8.sgml fcrontab.1.sgml install.sgml fcron.conf.5.sgml fcrontab.5.sgml fcrondyn.1.sgml fdl.sgml gpl.sgml
TXTFILES = readme install thanks faq gpl todo relnotes changes
MANPAGES = fcron.8 fcron.conf.5 fcrontab.1 fcrontab.5 fcrondyn.1
+LANGUAGES = en fr
# this is a regular expression:
# do not ci these files
all: doc
-doc: HTML/index.html
+doc:
+# Build all the HTML, text and manual pages in all the languages
+ @(for i in $(LANGUAGES); \
+ do \
+ make $$i/HTML/index.html $$i/txt/readme.txt $$i/man/fcron.8 ; \
+ done)
-mandoc:
+# man/fcron.8 means in fact "build *all* the man pages"
+%/man/fcron.8: %/*.sgml fcron-doc.mod stylesheets/fcron-doc.dsl.in
@(if test -z "$(DB2MAN_BEFORE)"; then \
echo "ERROR: cannot generate man pages." ; \
echo " Please check if a db2man converter is installed, or if" \
echo " --with-db2man and --with-db2man-spec are correctly set." ; \
exit 1 ; \
fi)
- @(echo ; echo "Building man pages ..."; echo )
- cp -f bitstring.3 man/
- @(for i in $(MANPAGES); do \
- echo " $$i ..."; \
- echo '<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [<!ENTITY % decl SYSTEM "fcron-doc.mod">%decl;]>' > _tmp_ ; \
- echo "&$$i;" >> _tmp_ ; \
- $(DB2MAN_BEFORE) _tmp_ $(DB2MAN_AFTER) > /dev/null 2>&1 ; \
- rm -f _tmp_ ; \
- mv `basename $$i .sgml` man/ ; \
- done)
- rm -f manpage.links manpage.refs
-
-
-txtdoc: HTML/index.html
- @(echo ; echo "Building txt files ..."; echo )
+ @(echo ; echo "Building $(@D) manual pages..."; echo )
+ @(cp -f bitstring.3 $(@D)/)
+ @(cd $(@D)/../ ; \
+ ln ../fcron-doc.mod ./ ; \
+ for i in $(MANPAGES); do \
+ echo " $(@D)/$$i..."; \
+ echo '<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [<!ENTITY % decl SYSTEM "fcron-doc.mod">%decl;]>' > _tmp_ ; \
+ echo "&$$i;" >> _tmp_ ; \
+ $(DB2MAN_BEFORE) _tmp_ $(DB2MAN_AFTER) > /dev/null 2>&1 ; \
+ rm -f _tmp_ ; \
+ mv `basename $$i .sgml` man/ ; \
+ done ; \
+ rm fcron-doc.mod ; \
+ rm -f manpage.links manpage.refs)
+
+
+# txt/readme.txt means in fact "build *all* the text pages"
+%/txt/readme.txt: %/HTML/index.html
+ @(echo ; echo "Building $(@D) files..."; echo )
@(for i in $(TXTFILES); do \
- echo " $$i ..."; \
- lynx -dump -nolist HTML/$$i.html > txt/$$i.txt; done )
+ echo " $(@D)/$$i..."; \
+ lynx -dump -nolist $(@D)/../HTML/$$i.html > $(@D)/$$i.txt; done )
fcron-doc.mod: fcron-doc.mod.in ../configure.in
- @(echo ; echo "Building fcron-doc.mod"; echo)
- ../script/gen-in.pl fcron-doc.mod.in fcron-doc.mod ../
-
-HTML/index.html: $(SGMLFILES) fcron-doc.mod.in stylesheets/fcron-doc.dsl.in
- make fcron-doc.mod
- @(echo ; echo "Building index.html"; echo)
- rm -fR HTML/*.html
- $(JADE) -t sgml -i html -d stylesheets/fcron-doc.dsl\#html fcron-doc.sgml
-# We put that here to avoid to run this each time, even if doc is up to date
-# (as it is not a file, make cannot check if it is up to date)
- make mandoc txtdoc
+ @(echo ; echo "Building fcron-doc.mod")
+ @(../script/gen-in.pl fcron-doc.mod.in fcron-doc.mod ../)
+
+# HTML/index.html means in fact "build *all* the HTML pages"
+%/HTML/index.html: %/*.sgml fcron-doc.mod stylesheets/fcron-doc.dsl.in
+ @(echo ; echo "Building $(@D)...")
+ @(rm -fR $(@D)/*.html)
+ @(cd $(@D)/../ ; $(JADE) -D ../ -D ./ -t sgml -i html -d ../stylesheets/fcron-doc.dsl\#html fcron-doc.sgml)
install: clean
@(echo "Creating man directories (if needed) ...")
clean:
- @(cd $(SRCDIR) ; for i in man txt stylesheets . ; do \
- cd $$i ; \
- echo "Cleaning: `pwd`"; \
- rm -f *~ *.html *.htm *.texi *.info *.refs manpage.links manpage.refs \
+ @(cd $(SRCDIR) ; \
+ BASEDIR=`pwd` ; \
+ for i in stylesheets $(LANGUAGES) . ; do \
+ cd $$i ; \
+ echo "Cleaning: `pwd`"; \
+ rm -f *~ *.html *.htm *.texi *.info *.refs manpage.links manpage.refs \
core *.tar.gz ; \
- cd .. ; \
+ cd $$BASEDIR ; \
done)
tarclean: clean
rm -f Makefile stylesheets/fcron-doc.dsl fcron-doc.mod
vclean: clean
- rm -f HTML/* man/* txt/*
+ rm -f */HTML/* */man/* */txt/*
ci: clean
# we run a "cd .." because it makes appear the path of the file ( ./doc/XXXX )
-exec ci -l -Nver`echo $(VERSION) | tr '.' '_'` {} \;)
tarhtmldoc: doc
- mkdir fcron-$(VERSION)-doc-html
- cp HTML/*.html fcron-$(VERSION)-doc-html
- rm -f fcron-doc-html.tar.gz
- tar -czvf fcron-doc-html.tar.gz fcron-$(VERSION)-doc-html/*
- rm -fR fcron-$(VERSION)-doc-html
+ for i in $(LANGUAGES); do \
+ cd $$i ; \
+ mkdir fcron-$(VERSION)-doc-$$i-html ;\
+ cp HTML/*.html fcron-$(VERSION)-doc-$$i-html ;\
+ rm -f fcron-doc-$$i-html.tar.gz ;\
+ tar -czvf fcron-doc-$$i-html.tar.gz fcron-$(VERSION)-doc-$$i-html/* ;\
+ rm -fR fcron-$(VERSION)-doc-$$i-html ; \
+ cd .. ; \
+ done