From: thib Date: Sun, 5 Feb 2006 19:26:40 +0000 (+0000) Subject: Updated to support multiple languages (so far: en, fr) X-Git-Tag: ver3_0_1~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01567be591ec6f0e3e80ee9058ce795e666f4cf8;p=fcron Updated to support multiple languages (so far: en, fr) --- diff --git a/doc/Makefile.in b/doc/Makefile.in index e41e84b..f5f3ce0 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -4,7 +4,7 @@ # @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 @@ -37,6 +37,7 @@ VERSION = @VERSION@ 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 @@ -44,9 +45,15 @@ RCSNOCI=.*\(bitstring.3\|fcron-doc.ced\|Makefile\|stylesheets/fcron-doc.dsl\|fcr 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" \ @@ -54,37 +61,38 @@ mandoc: 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 '%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 '%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) ...") @@ -128,19 +136,21 @@ uninstall: 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 ) @@ -150,8 +160,12 @@ ci: clean -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