2
# -*- Mode: perl; indent-tabs-mode: nil -*-
4
# The contents of this file are subject to the Mozilla Public
5
# License Version 1.1 (the "License"); you may not use this file
6
# except in compliance with the License. You may obtain a copy of
7
# the License at http://www.mozilla.org/MPL/
9
# Software distributed under the License is distributed on an "AS
10
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11
# implied. See the License for the specific language governing
12
# rights and limitations under the License.
14
# The Original Code is the Bugzilla Bug Tracking System.
16
# The Initial Developer of the Original Code is Netscape Communications
17
# Corporation. Portions created by Netscape are
18
# Copyright (C) 1998 Netscape Communications Corporation. All
21
# Contributor(s): Matthew Tuck <matty@chariot.net.au>
22
# Jacob Steenhagen <jake@bugzilla.org>
24
# This script compiles all the documentation.
31
###############################################################################
32
# Environment Variable Checking
33
###############################################################################
35
my ($JADE_PUB, $LDP_HOME);
37
if (defined $ENV{JADE_PUB} && $ENV{JADE_PUB} ne '') {
38
$JADE_PUB = $ENV{JADE_PUB};
41
die "You need to set the JADE_PUB environment variable first.";
44
if (defined $ENV{LDP_HOME} && $ENV{LDP_HOME} ne '') {
45
$LDP_HOME = $ENV{LDP_HOME};
48
die "You need to set the LDP_HOME environment variable first.";
51
###############################################################################
53
###############################################################################
57
my ($name, $cmdline) = @_;
59
print "Creating $name documentation ...\n" if defined $name;
66
###############################################################################
68
###############################################################################
73
MakeDocs('separate HTML', "jade -t sgml -i html -d $LDP_HOME/ldp.dsl\#html " .
74
"$JADE_PUB/xml.dcl ../xml/Bugzilla-Guide.xml");
75
MakeDocs('big HTML', "jade -V nochunks -t sgml -i html -d " .
76
"$LDP_HOME/ldp.dsl\#html $JADE_PUB/xml.dcl " .
77
"../xml/Bugzilla-Guide.xml > Bugzilla-Guide.html");
78
MakeDocs('big text', "lynx -dump -justify=off -nolist Bugzilla-Guide.html " .
79
"> ../txt/Bugzilla-Guide.txt");
81
if (! grep("--with-pdf", @ARGV)) {
85
MakeDocs('PDF', "jade -t tex -d $LDP_HOME/ldp.dsl\#print $JADE_PUB/xml.dcl " .
86
'../xml/Bugzilla-Guide.xml');
88
MakeDocs(undef, 'mv ../xml/Bugzilla-Guide.tex .');
89
MakeDocs(undef, 'jadetex Bugzilla-Guide.tex');
90
MakeDocs(undef, 'jadetex Bugzilla-Guide.tex');
91
MakeDocs(undef, 'jadetex Bugzilla-Guide.tex');
92
MakeDocs(undef, 'dvips -o Bugzilla-Guide.ps Bugzilla-Guide.dvi');
93
MakeDocs(undef, 'ps2pdf Bugzilla-Guide.ps Bugzilla-Guide.pdf');
94
MakeDocs(undef, 'rm Bugzilla-Guide.tex Bugzilla-Guide.log Bugzilla-Guide.dvi ' .
95
'Bugzilla-Guide.aux Bugzilla-Guide.ps');