diff options
author | lpsolit%gmail.com <> | 2008-04-04 02:05:36 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-04-04 02:05:36 +0200 |
commit | 8ab64629d3a091a0ccb6af52c48ee7bb9fd8834d (patch) | |
tree | eb8bd3bdb7a2d3b520f18938364268c6ab4858ed /docs/makedocs.pl | |
parent | 59d76227caa0d8304f243bd8d2d8534ed6d80e81 (diff) | |
download | bugzilla-8ab64629d3a091a0ccb6af52c48ee7bb9fd8834d.tar.gz bugzilla-8ab64629d3a091a0ccb6af52c48ee7bb9fd8834d.tar.xz |
Bug 182975: Bugzilla directory structure to be adopted to l10n needs - Patch by A.A. Shimono (himorin) <shimono@mozilla.gr.jp> r=LpSolit r=mkanat a=LpSolit
Diffstat (limited to 'docs/makedocs.pl')
-rw-r--r-- | docs/makedocs.pl | 85 |
1 files changed, 56 insertions, 29 deletions
diff --git a/docs/makedocs.pl b/docs/makedocs.pl index 1b9a44296..ae5ba4057 100644 --- a/docs/makedocs.pl +++ b/docs/makedocs.pl @@ -26,6 +26,7 @@ # This script compiles all the documentation. use strict; +use Cwd; # We need to be in this directory to use our libraries. BEGIN { @@ -58,7 +59,7 @@ use Bugzilla::Constants qw(DB_MODULE BUGZILLA_VERSION); my $modules = REQUIRED_MODULES; my $opt_modules = OPTIONAL_MODULES; -open(ENTITIES, '>', 'xml/bugzilla.ent') or die('Could not open xml/bugzilla.ent: ' . $!); +open(ENTITIES, '>', 'bugzilla.ent') or die('Could not open bugzilla.ent: ' . $!); print ENTITIES '<?xml version="1.0"?>' ."\n\n"; print ENTITIES '<!-- Module Versions -->' . "\n"; foreach my $module (@$modules, @$opt_modules) @@ -156,10 +157,10 @@ END_HTML $converter->contents_page_start($contents_start); $converter->contents_page_end("</body></html>"); - $converter->add_css('style.css'); + $converter->add_css('./../../../style.css'); $converter->javascript_flurry(0); $converter->css_flurry(0); - $converter->batch_convert(['../'], 'html/api/'); + $converter->batch_convert(['../../'], 'html/api/'); print "\n"; } @@ -168,38 +169,64 @@ END_HTML # Make the docs ... ############################################################################### -if (!-d 'txt') { - unlink 'txt'; - mkdir 'txt', 0755; +my @langs; +# search for sub directories which have a 'xml' sub-directory +opendir(LANGS, './'); +foreach my $dir (readdir(LANGS)) { + next if (($dir eq '.') || ($dir eq '..') || (! -d $dir)); + if (-d "$dir/xml") { + push(@langs, $dir); + } } -if (!-d 'pdf') { - unlink 'pdf'; - mkdir 'pdf', 0755; -} - -make_pod() if $pod_simple; -exit unless $build_docs; - -chdir 'html'; - -MakeDocs('separate HTML', "jade -t sgml -i html -d $LDP_HOME/ldp.dsl\#html " . +closedir(LANGS); + +my $docparent = getcwd(); +foreach my $lang (@langs) { + chdir "$docparent/$lang"; + MakeDocs(undef, 'cp ../bugzilla.ent ./xml/'); + + if (!-d 'txt') { + unlink 'txt'; + mkdir 'txt', 0755; + } + if (!-d 'pdf') { + unlink 'pdf'; + mkdir 'pdf', 0755; + } + if (!-d 'html') { + unlink 'html'; + mkdir 'html', 0755; + } + if (!-d 'html/api') { + unlink 'html/api'; + mkdir 'html/api', 0755; + } + + make_pod() if $pod_simple; + next unless $build_docs; + + chdir 'html'; + + MakeDocs('separate HTML', "jade -t sgml -i html -d $LDP_HOME/ldp.dsl\#html " . "$JADE_PUB/xml.dcl ../xml/Bugzilla-Guide.xml"); -MakeDocs('big HTML', "jade -V nochunks -t sgml -i html -d " . + MakeDocs('big HTML', "jade -V nochunks -t sgml -i html -d " . "$LDP_HOME/ldp.dsl\#html $JADE_PUB/xml.dcl " . "../xml/Bugzilla-Guide.xml > Bugzilla-Guide.html"); -MakeDocs('big text', "lynx -dump -justify=off -nolist Bugzilla-Guide.html " . + MakeDocs('big text', "lynx -dump -justify=off -nolist Bugzilla-Guide.html " . "> ../txt/Bugzilla-Guide.txt"); -if (! grep($_ eq "--with-pdf", @ARGV)) { - exit; -} + if (! grep($_ eq "--with-pdf", @ARGV)) { + next; + } -MakeDocs('PDF', "jade -t tex -d $LDP_HOME/ldp.dsl\#print $JADE_PUB/xml.dcl " . + MakeDocs('PDF', "jade -t tex -d $LDP_HOME/ldp.dsl\#print $JADE_PUB/xml.dcl " . '../xml/Bugzilla-Guide.xml'); -chdir '../pdf'; -MakeDocs(undef, 'mv ../xml/Bugzilla-Guide.tex .'); -MakeDocs(undef, 'pdfjadetex Bugzilla-Guide.tex'); -MakeDocs(undef, 'pdfjadetex Bugzilla-Guide.tex'); -MakeDocs(undef, 'pdfjadetex Bugzilla-Guide.tex'); -MakeDocs(undef, 'rm Bugzilla-Guide.tex Bugzilla-Guide.log Bugzilla-Guide.aux Bugzilla-Guide.out'); + chdir '../pdf'; + MakeDocs(undef, 'mv ../xml/Bugzilla-Guide.tex .'); + MakeDocs(undef, 'pdfjadetex Bugzilla-Guide.tex'); + MakeDocs(undef, 'pdfjadetex Bugzilla-Guide.tex'); + MakeDocs(undef, 'pdfjadetex Bugzilla-Guide.tex'); + MakeDocs(undef, 'rm Bugzilla-Guide.tex Bugzilla-Guide.log Bugzilla-Guide.aux Bugzilla-Guide.out'); + +} |