diff --git a/mozilla/webtools/build/config.cgi b/mozilla/webtools/build/config.cgi
index eb4cf3e3a2d..3794d6a9832 100755
--- a/mozilla/webtools/build/config.cgi
+++ b/mozilla/webtools/build/config.cgi
@@ -136,31 +136,41 @@ sub print_script_preview {
}
}
+ my $script = &print_script;
+
+ if ($script eq '') {
+ print "";
+ print "No script needed. Only default values were selected.
\n";
+ print "
";
+ } else {
+ print qq(
+
+
+
+
+
+
+
+
+
+
+
$script
+
+
+
+
+
+
+
+
+ );
+ }
+
print qq(
-
-
-
-
-
-
-
);
-
- &print_script;
-
- print qq(
-
-
-
-
-
-
-
-
-
Save the script, then build the tree as follows,
@@ -176,13 +186,16 @@ Save the script, then build the tree as follows,
If you do not want to use client.mk,
-then use your usual build steps.
+then use your favorite build steps, and
configure will
pick up the options in your .mozconfig script.
-
Send questions or comments to
<slamm\@netcape.com>.
@@ -192,13 +205,14 @@ for more information.
}
sub print_script {
+ my $out = '';
- print "# sh\n";
- print "# Build configuration script\n";
- print "#\n";
- print "# See http://www.mozilla.org/build/unix.html for build instructions.\n";
- print "#\n";
- print "\n";
+ $out = "# sh\n";
+ $out .= "# Build configuration script\n";
+ $out .= "#\n";
+ $out .= "# See http://www.mozilla.org/build/unix.html for build instructions.\n";
+ $out .= "#\n";
+ $out .= "\n";
foreach $param ($query->param()) {
if ($param =~ /^MOZ_/) {
@@ -207,25 +221,27 @@ sub print_script {
$value =~ s/^\s+//;
next if $value eq $default{$param};
$value = "\"$value\"" if $value =~ /\s/;
- print "# Options for client.mk.\n" if not $have_client_mk_options;
- print "mk_add_options $param=".$value."\n";
+ $out .= "# Options for client.mk.\n" unless $have_client_mk_options;
+ $out .= "mk_add_options $param=".$value."\n";
$have_client_mk_options = 1;
}
}
- print "\n" if $have_client_mk_options;
+ $out .= "\n" if $have_client_mk_options;
foreach $param ($query->param()) {
if ($param =~ /^--/) {
next if $query->param($param) eq '';
- print "# Options for 'configure' (same as command-line options).\n"
+ $out .= "# Options for 'configure' (same as command-line options).\n"
if not $have_configure_options;
- print "ac_add_options $param";
- print "=".$query->param($param) if $query->param($param) ne "yes";
- print "\n";
+ $out .= "ac_add_options $param";
+ $out .= "=".$query->param($param) if $query->param($param) ne "yes";
+ $out .= "\n";
$have_configure_options = 1;
}
}
- if (not $have_client_mk_options and not $have_configure_options) {
- print "\n# No script needed. Only default values were selected\n";
+ if ($have_client_mk_options or $have_configure_options) {
+ return $out;
+ } else {
+ return '';
}
}
@@ -258,7 +274,7 @@ sub print_configure_form {
Unix Build Configurator
- The mozilla Unix build system is designed to build free of any user set
+ The mozilla Unix Build System is designed to work free of any user set
options. However, should you need to tweak an option, the
Configurator is here to help.
This form produces a script that you can use to configure your build.
@@ -380,6 +396,12 @@ sub print_configure_form {