1999-02-19 00:52:11 +03:00
|
|
|
#!/usr/bonsaitools/bin/perl --
|
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Netscape Public License
|
|
|
|
# Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
# compliance with the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/NPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS"
|
|
|
|
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing rights and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
1999-02-19 23:53:25 +03:00
|
|
|
# The Original Code is this file as it was released upon February 18, 1999.
|
1999-02-19 00:52:11 +03:00
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
|
|
|
# Corporation. Portions created by Netscape are Copyright (C) 1998
|
|
|
|
# Netscape Communications Corporation. All Rights Reserved.
|
|
|
|
|
1999-02-19 23:53:25 +03:00
|
|
|
# config.cgi - Configure a mozilla build.
|
|
|
|
# Outputs a form of configure options.
|
|
|
|
# On submit, the cgi prints out a shell script that the user can
|
|
|
|
# save to configure their build.
|
|
|
|
|
|
|
|
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
1999-02-19 00:27:26 +03:00
|
|
|
use CGI;
|
|
|
|
|
|
|
|
$query = new CGI;
|
1999-02-20 04:11:02 +03:00
|
|
|
$field_separator = '<<fs>>';
|
1999-03-05 02:53:38 +03:00
|
|
|
$configure_in = 'configure-mirror/mozilla/configure.in';
|
1999-02-20 04:11:02 +03:00
|
|
|
$chrome_color = '#F0A000';
|
1999-03-05 02:53:38 +03:00
|
|
|
$CVSROOT = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
|
1999-03-06 00:26:04 +03:00
|
|
|
$ENV{PATH} = "$ENV{PATH}:/opt/cvs-tools/bin:/usr/local/bin"; # for cvs & m4
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-05-05 00:52:53 +04:00
|
|
|
%default = (
|
1999-04-28 00:29:30 +04:00
|
|
|
'MOZ_CO_MODULE', 'SeaMonkeyEditor',
|
|
|
|
'MOZ_CO_BRANCH', 'HEAD',
|
|
|
|
'MOZ_OBJDIR', '@TOPSRCDIR@',
|
|
|
|
'MOZ_CVS_FLAGS', '-q -z 3',
|
1999-09-18 05:05:35 +04:00
|
|
|
'MOZ_CO_FLAGS', '-P',
|
1999-04-28 00:29:30 +04:00
|
|
|
);
|
|
|
|
|
|
|
|
# Set up pull by date
|
|
|
|
#
|
|
|
|
use POSIX qw(strftime);
|
|
|
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
1999-05-05 00:52:53 +04:00
|
|
|
$default{MOZ_CO_DATE} = strftime("%d %b %Y %H:%M %Z",
|
|
|
|
$sec,$min,$hour,$mday,$mon,$year);
|
1999-04-28 00:29:30 +04:00
|
|
|
|
1999-05-05 00:52:53 +04:00
|
|
|
%fillin = %default;
|
1999-05-05 22:32:01 +04:00
|
|
|
$default_objdir_fillin='@TOPSRCDIR@/obj-@CONFIG_GUESS@';
|
|
|
|
$fillin{MOZ_OBJDIR} = $default_objdir_fillin;
|
1999-09-18 05:05:35 +04:00
|
|
|
$fillin{MOZ_MAKE_FLAGS}='-j4';
|
1999-05-05 22:32:01 +04:00
|
|
|
|
1999-02-19 00:27:26 +03:00
|
|
|
if ($query->param()) {
|
1999-02-20 05:20:59 +03:00
|
|
|
&parse_params;
|
1999-03-04 06:07:50 +03:00
|
|
|
if ($query->param(preview) eq "1") {
|
1999-02-20 05:20:59 +03:00
|
|
|
print "Content-type: text/html\n\n";
|
1999-02-20 04:11:02 +03:00
|
|
|
&print_script_preview;
|
1999-03-04 06:07:50 +03:00
|
|
|
exit 0;
|
|
|
|
} elsif ($query->param(saveas) eq "1") {
|
1999-02-20 05:20:59 +03:00
|
|
|
print "Content-type: text/saveas\n\n";
|
1999-09-18 04:37:29 +04:00
|
|
|
print print_script();
|
1999-03-04 06:07:50 +03:00
|
|
|
exit 0;
|
1999-02-20 04:11:02 +03:00
|
|
|
}
|
|
|
|
}
|
1999-05-05 00:52:53 +04:00
|
|
|
|
1999-03-04 06:07:50 +03:00
|
|
|
print "Content-type: text/html\n\n";
|
|
|
|
&print_configure_form;
|
|
|
|
|
|
|
|
## End main program
|
|
|
|
#########################################################
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-02-20 05:20:59 +03:00
|
|
|
sub parse_params {
|
1999-04-28 00:29:30 +04:00
|
|
|
if ($query->param('pull_by_date') eq 'on') {
|
|
|
|
my $pull_date = $query->param('pull_date');
|
|
|
|
$query->param(-name=>'MOZ_CO_DATE', -values=>[ $pull_date ]);
|
1999-02-20 05:20:59 +03:00
|
|
|
}
|
1999-09-18 05:05:35 +04:00
|
|
|
if ($query->param('parallel_build') eq 'on') {
|
|
|
|
my $gmake_flags = $query->param('gmake_flags');
|
|
|
|
$query->param(-name=>'MOZ_MAKE_FLAGS', -values=>[ $gmake_flags ]);
|
|
|
|
}
|
1999-05-05 00:52:53 +04:00
|
|
|
if ($query->param('MOZ_OBJDIR') eq 'fillin') {
|
|
|
|
my $objdir = $query->param('objdir_fillin');
|
|
|
|
$query->param(-name=>'MOZ_OBJDIR', -values=>[ $objdir ]);
|
|
|
|
}
|
|
|
|
foreach $param ($query->param()) {
|
|
|
|
$fillin{$param} = $query->param($param) if defined($fillin{$param});
|
|
|
|
}
|
1999-02-20 05:20:59 +03:00
|
|
|
}
|
|
|
|
|
1999-02-20 04:11:02 +03:00
|
|
|
sub print_script_preview {
|
1999-02-20 10:52:15 +03:00
|
|
|
my ($saveopts) = '';
|
|
|
|
foreach $param ($query->param()) {
|
|
|
|
if ($param =~ /^(MOZ_|--)/) {
|
|
|
|
next if $query->param($param) eq '';
|
|
|
|
$saveopts .= "$param=".$query->param($param).'&';
|
|
|
|
}
|
|
|
|
}
|
1999-02-20 05:20:59 +03:00
|
|
|
|
1999-02-20 04:11:02 +03:00
|
|
|
print qq(
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
1999-02-20 09:36:03 +03:00
|
|
|
<TITLE>Configurator Script Preview</TITLE>
|
1999-02-20 04:11:02 +03:00
|
|
|
</HEAD>
|
1999-03-13 03:51:40 +03:00
|
|
|
<body BGCOLOR="#FFFFFF" TEXT="#000000"LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">);
|
1999-02-20 10:52:15 +03:00
|
|
|
|
|
|
|
|
1999-02-20 09:36:03 +03:00
|
|
|
print qq(
|
1999-03-13 03:51:40 +03:00
|
|
|
<TABLE BGCOLOR="#000000" WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
|
|
|
<TR><TD>
|
|
|
|
<A HREF="http://www.mozilla.org/">
|
|
|
|
<IMG SRC="http://www.mozilla.org/images/mozilla-banner.gif" ALT="" BORDER=0 WIDTH=600 HEIGHT=58>
|
|
|
|
</A>
|
|
|
|
</TD></TR></TABLE>
|
|
|
|
|
1999-03-11 01:20:55 +03:00
|
|
|
<table cellspacing=2 cellpading=0 border=0 width=600><tr><td>
|
1999-02-20 10:52:15 +03:00
|
|
|
|
1999-02-20 05:20:59 +03:00
|
|
|
<font size='+1' face='Helvetica,Arial'><b>
|
1999-02-20 09:36:03 +03:00
|
|
|
Configurator Script Preview</b></font>
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr><tr></tr><tr><td>
|
1999-03-13 03:51:40 +03:00
|
|
|
Check the script to make sure the options are correct.
|
|
|
|
Then, save this script as <code><b>~/.mozconfig</b></code>.
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr></table>
|
|
|
|
|
1999-03-13 03:51:40 +03:00
|
|
|
<form action='.mozconfig' method='get'>
|
|
|
|
<input type='hidden' name='saveas' value='1'>
|
1999-03-31 05:45:46 +04:00
|
|
|
);
|
|
|
|
foreach $param ($query->param()) {
|
|
|
|
if ($param =~ /^(MOZ_|--)/) {
|
1999-05-05 22:32:01 +04:00
|
|
|
my $value = $query->param($param);
|
|
|
|
$value =~ s/\s+$//;
|
|
|
|
$value =~ s/^\s+//;
|
|
|
|
next if $param =~ /^--/ and $value eq '';
|
|
|
|
next if $param =~ /^MOZ_/ and $value eq $default{$param};
|
|
|
|
|
1999-03-31 05:45:46 +04:00
|
|
|
print "<input type='hidden' name=$param value='"
|
|
|
|
.$query->param($param)."'>\n";
|
|
|
|
}
|
|
|
|
}
|
1999-03-13 03:51:40 +03:00
|
|
|
|
1999-08-13 19:57:50 +04:00
|
|
|
my $script = &print_script;
|
|
|
|
|
|
|
|
if ($script eq '') {
|
|
|
|
print "<font size='+1'><b>";
|
|
|
|
print "No script needed. Only default values were selected.<p>\n";
|
|
|
|
print "</b></font>";
|
|
|
|
} else {
|
|
|
|
print qq(
|
|
|
|
<!--
|
|
|
|
<table cellpadding=0 cellspacing=1><tr><td>
|
|
|
|
<input type='submit' value='Save the script'>
|
|
|
|
</td></tr></table>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<table cellspacing=2 cellpading=0 border=0>
|
|
|
|
<tr><td>
|
|
|
|
<table bgcolor="#FF0000" cellspacing=0 cellpadding=2 border=0>
|
|
|
|
<tr valign=middle><td align=center>
|
|
|
|
<table bgcolor="$chrome_color" cellspacing=0 cellpadding=2 border=0>
|
|
|
|
<tr valign=middle><td align=center>
|
|
|
|
<table bgcolor="#FFFFFF" cellspacing=0 cellpadding=10 width="600" border=0>
|
|
|
|
<tr><td>
|
|
|
|
<pre>$script</pre>
|
|
|
|
</td></tr></table>
|
|
|
|
</td></tr></table>
|
|
|
|
</td></tr></table>
|
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
<table cellpadding=0 cellspacing=1><tr><td>
|
|
|
|
<input type='submit' value='Save the script'>
|
|
|
|
</td></tr></table>
|
|
|
|
);
|
|
|
|
}
|
1999-02-20 10:52:15 +03:00
|
|
|
|
1999-08-13 19:57:50 +04:00
|
|
|
print qq(
|
1999-03-13 03:51:40 +03:00
|
|
|
<table cellspacing=0 cellpadding=0 border=0>
|
1999-02-20 10:52:15 +03:00
|
|
|
<tr><td colspan=3>
|
1999-03-11 01:20:55 +03:00
|
|
|
Save the script, then build the tree as follows,
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr><tr><td> </td><td>
|
1999-04-15 00:37:03 +04:00
|
|
|
1. </td><td> <code>cvs co mozilla/client.mk</code>
|
1999-03-11 01:20:55 +03:00
|
|
|
</td></tr><tr><td></td><td>
|
1999-04-15 00:37:03 +04:00
|
|
|
2. </td><td> <code>cd mozilla</code>
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr><tr><td></td><td>
|
1999-04-15 00:37:03 +04:00
|
|
|
3. </td><td> <code>gmake -f client.mk</code><br>
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr><tr><td></td><td>
|
1999-04-15 00:37:03 +04:00
|
|
|
</td><td> (default targets: <code>checkout depend build</code>)
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr>
|
1999-03-13 03:51:40 +03:00
|
|
|
</td></tr><tr><td colspan=3> </td></tr><tr><td colspan=3>
|
1999-02-20 10:52:15 +03:00
|
|
|
</td></tr></table>
|
1999-04-15 00:37:03 +04:00
|
|
|
If you do not want to use <code><b>client.mk</b></code>,
|
1999-08-13 19:57:50 +04:00
|
|
|
then use your favorite build steps, and
|
1999-04-15 00:37:03 +04:00
|
|
|
<code><b>configure</b></code> will
|
|
|
|
pick up the options in your <code><b>.mozconfig</b></code> script.
|
1999-03-11 01:20:55 +03:00
|
|
|
<p>
|
1999-08-13 19:57:50 +04:00
|
|
|
Questions? See the
|
|
|
|
<a href="http://www.mozilla.org/build/configurator-faq.html">
|
|
|
|
Configurator FAQ</a>.<br>
|
|
|
|
<a href="http://www.mozilla.org/build/unix.html">
|
|
|
|
Back to the Unix Build Instructions</a>
|
|
|
|
<p>
|
1999-03-11 01:20:55 +03:00
|
|
|
<hr align=left width=600>
|
1999-02-20 05:20:59 +03:00
|
|
|
Send questions or comments to
|
|
|
|
<<a href="mailto:slamm\@netscape.com?subject=About the Build Configurator">slamm\@netcape.com</a>>.
|
1999-02-20 10:52:15 +03:00
|
|
|
</form>
|
|
|
|
|
1999-02-20 04:11:02 +03:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub print_script {
|
1999-08-13 19:57:50 +04:00
|
|
|
my $out = '';
|
1999-02-19 23:17:25 +03:00
|
|
|
|
1999-08-13 19:57:50 +04:00
|
|
|
$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";
|
1999-02-20 05:38:06 +03:00
|
|
|
|
1999-02-20 04:11:02 +03:00
|
|
|
foreach $param ($query->param()) {
|
1999-02-19 23:17:25 +03:00
|
|
|
if ($param =~ /^MOZ_/) {
|
1999-03-11 01:20:55 +03:00
|
|
|
my $value = $query->param($param);
|
1999-03-11 03:10:46 +03:00
|
|
|
$value =~ s/\s+$//;
|
|
|
|
$value =~ s/^\s+//;
|
1999-05-05 00:52:53 +04:00
|
|
|
next if $value eq $default{$param};
|
1999-04-28 00:29:30 +04:00
|
|
|
$value = "\"$value\"" if $value =~ /\s/;
|
1999-08-13 19:57:50 +04:00
|
|
|
$out .= "# Options for client.mk.\n" unless $have_client_mk_options;
|
|
|
|
$out .= "mk_add_options $param=".$value."\n";
|
1999-04-15 00:37:03 +04:00
|
|
|
$have_client_mk_options = 1;
|
1999-02-20 04:11:02 +03:00
|
|
|
}
|
|
|
|
}
|
1999-08-13 19:57:50 +04:00
|
|
|
$out .= "\n" if $have_client_mk_options;
|
1999-02-20 04:11:02 +03:00
|
|
|
foreach $param ($query->param()) {
|
|
|
|
if ($param =~ /^--/) {
|
1999-02-20 05:20:59 +03:00
|
|
|
next if $query->param($param) eq '';
|
1999-08-13 19:57:50 +04:00
|
|
|
$out .= "# Options for 'configure' (same as command-line options).\n"
|
1999-04-15 00:37:03 +04:00
|
|
|
if not $have_configure_options;
|
1999-08-13 19:57:50 +04:00
|
|
|
$out .= "ac_add_options $param";
|
|
|
|
$out .= "=".$query->param($param) if $query->param($param) ne "yes";
|
|
|
|
$out .= "\n";
|
1999-04-15 00:37:03 +04:00
|
|
|
$have_configure_options = 1;
|
1999-02-19 23:17:25 +03:00
|
|
|
}
|
1999-02-19 00:27:26 +03:00
|
|
|
}
|
1999-08-13 19:57:50 +04:00
|
|
|
if ($have_client_mk_options or $have_configure_options) {
|
|
|
|
return $out;
|
|
|
|
} else {
|
|
|
|
return '';
|
1999-04-15 00:37:03 +04:00
|
|
|
}
|
1999-02-20 04:11:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
sub print_configure_form {
|
1999-03-05 02:53:38 +03:00
|
|
|
mkdir 'configure-mirror', 0777 if not -d 'configure-mirror';
|
1999-03-06 00:26:04 +03:00
|
|
|
system 'echo :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot Ay=0=a%0bZ | cat > configure-mirror/.cvspass' if not -f 'configure-mirror/.cvspass';
|
1999-05-05 23:36:51 +04:00
|
|
|
symlink 'config.cgi', '.mozconfig' if not -f '.mozconfig';
|
1999-03-05 03:48:35 +03:00
|
|
|
# Set the HOME variable to pick up '.cvspass' for cvs login
|
1999-03-05 23:53:22 +03:00
|
|
|
system "cd configure-mirror && HOME=. cvs -d $CVSROOT co mozilla/configure.in > /dev/null 2>&1";
|
1999-02-19 23:17:25 +03:00
|
|
|
|
|
|
|
print qq(
|
1999-02-20 04:11:02 +03:00
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
|
|
<TITLE>Mozilla Unix Build Configurator</TITLE>
|
|
|
|
</HEAD>
|
1999-05-05 00:52:53 +04:00
|
|
|
<body BGCOLOR="#FFFFFF" TEXT="#000000"LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-03-11 01:20:55 +03:00
|
|
|
<FORM action='config.cgi' method='POST' name='ff'>
|
1999-03-04 06:07:50 +03:00
|
|
|
<INPUT Type='hidden' name='preview' value='1'>
|
1999-02-20 10:52:15 +03:00
|
|
|
|
1999-03-13 03:51:40 +03:00
|
|
|
<TABLE BGCOLOR="#000000" WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
|
|
|
|
<TR><TD>
|
|
|
|
<A HREF="http://www.mozilla.org/">
|
|
|
|
<IMG SRC="http://www.mozilla.org/images/mozilla-banner.gif" ALT="" BORDER=0 WIDTH=600 HEIGHT=58>
|
|
|
|
</A>
|
|
|
|
</TD></TR></TABLE>
|
|
|
|
|
|
|
|
<table cellpadding=0 cellspacing=4 border=0 width="500"><tr><td>
|
|
|
|
<font size='+1' face='Helvetica,Arial'><b>
|
|
|
|
Unix Build Configurator
|
|
|
|
</b></font>
|
|
|
|
</td></tr><tr><td>
|
1999-08-13 19:57:50 +04:00
|
|
|
The mozilla Unix Build System is designed to work free of any user set
|
1999-04-16 00:07:18 +04:00
|
|
|
options. However, should you need to tweak an option, the
|
1999-08-13 19:27:56 +04:00
|
|
|
Configurator is here to help.<p>
|
1999-04-15 00:37:03 +04:00
|
|
|
This form produces a script that you can use to configure your build.
|
|
|
|
The script saves you the trouble of setting environment
|
|
|
|
variables for <code><b>client.mk</b></code>
|
|
|
|
or typing command-line options for <code><b>configure</b></code>.
|
1999-03-13 03:51:40 +03:00
|
|
|
</td></tr></table>
|
1999-02-20 10:52:15 +03:00
|
|
|
|
1999-03-13 03:51:40 +03:00
|
|
|
<table cellpadding=0 cellspacing=0 border=0><tr><td>
|
1999-02-20 10:52:15 +03:00
|
|
|
<input type="Submit" value="Preview Build Script">
|
|
|
|
</td></tr></table>
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-04-15 00:37:03 +04:00
|
|
|
<font size=+1 face="Helvetica,Arial"><b>
|
|
|
|
Options for "<code>client.mk</code>":
|
|
|
|
</b></font><br>
|
|
|
|
|
1999-03-11 03:10:46 +03:00
|
|
|
<table bgcolor="$chrome_color" cellspacing=0 cellpadding=0 border=0><tr><td>
|
|
|
|
<table bgcolor="#FFFFFF" cellspacing=2 cellpadding=0 border=0><tr><td>
|
|
|
|
<table cellspacing=0 cellpadding=4 border=0>
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-03-11 01:20:55 +03:00
|
|
|
<!-- Check out options -->
|
1999-02-20 04:11:02 +03:00
|
|
|
<tr bgcolor="$chrome_color"><td>
|
1999-03-11 01:20:55 +03:00
|
|
|
<font face="Helvetica,Arial"><b>Check out options:</b></font><br>
|
1999-02-20 04:11:02 +03:00
|
|
|
</td></tr><tr><td>
|
1999-04-28 00:29:30 +04:00
|
|
|
<table cellpadding=0 cellspacing=0 width="100%"><tr><td>
|
1999-03-11 01:20:55 +03:00
|
|
|
Check out module
|
1999-02-20 04:11:02 +03:00
|
|
|
</td><td>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="text" name="MOZ_CO_MODULE" value="$fillin{MOZ_CO_MODULE}">
|
1999-02-20 04:11:02 +03:00
|
|
|
</td></tr><tr><td>
|
1999-03-11 01:20:55 +03:00
|
|
|
Check out branch
|
1999-02-20 04:11:02 +03:00
|
|
|
</td><td>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="text" name="MOZ_CO_BRANCH" value="$fillin{MOZ_CO_BRANCH}">
|
1999-04-28 00:29:30 +04:00
|
|
|
</td></tr><tr><td>
|
|
|
|
CVS flags
|
|
|
|
</td><td>
|
|
|
|
<code>cvs</code>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="text" name="MOZ_CVS_FLAGS" value="$fillin{MOZ_CVS_FLAGS}"
|
1999-04-28 00:29:30 +04:00
|
|
|
size="16">
|
|
|
|
<code>co</code>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="text" name="MOZ_CO_FLAGS" value="$fillin{MOZ_CO_FLAGS}"
|
1999-04-28 00:29:30 +04:00
|
|
|
size="16">
|
|
|
|
</td></tr><tr><td>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="checkbox" name="pull_by_date");
|
1999-09-18 05:05:35 +04:00
|
|
|
#print 'checked' if $fillin{MOZ_CO_DATE} ne $default{MOZ_CO_DATE};
|
1999-05-05 00:52:53 +04:00
|
|
|
print qq(>
|
1999-04-28 00:29:30 +04:00
|
|
|
Pull by date
|
|
|
|
</td><td>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type='text' name='pull_date' value='$fillin{MOZ_CO_DATE}' size='25'>
|
1999-02-20 04:11:02 +03:00
|
|
|
</td></tr></table>
|
|
|
|
</td></tr>
|
|
|
|
|
|
|
|
<!-- Object Directory -->
|
|
|
|
<tr bgcolor="$chrome_color"><td>
|
|
|
|
<font face="Helvetica,Arial"><b>
|
|
|
|
Object Directory:</b></font><br>
|
1999-03-11 01:20:55 +03:00
|
|
|
</td></tr><tr><td><table><tr><td>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="radio" name="MOZ_OBJDIR" value="$default{MOZ_OBJDIR}");
|
1999-05-05 22:32:01 +04:00
|
|
|
print 'checked' if $fillin{MOZ_OBJDIR} eq $default_objdir_fillin;
|
1999-05-05 00:52:53 +04:00
|
|
|
print qq(>
|
1999-04-15 00:37:03 +04:00
|
|
|
<code>mozilla</code></td><td> Build in the source tree. (default)<br></td></tr><tr><td>
|
1999-05-05 00:52:53 +04:00
|
|
|
<input type="radio" name="MOZ_OBJDIR" value="fillin");
|
1999-05-05 22:32:01 +04:00
|
|
|
print 'checked' if $fillin{MOZ_OBJDIR} ne $default_objdir_fillin;
|
1999-05-05 00:52:53 +04:00
|
|
|
print qq(>
|
|
|
|
<input type="text" name="objdir_fillin" value="$fillin{MOZ_OBJDIR}" size='30'>
|
|
|
|
</td><td>);
|
|
|
|
print '(e.g. <code>mozilla/obj-i686-pc-linux-gnu)</code>'
|
|
|
|
if $fillin{MOZ_OBJDIR} eq $default{MOZ_OBJDIR};
|
|
|
|
print qq(
|
1999-03-11 03:10:46 +03:00
|
|
|
</td></tr></table>
|
1999-02-25 22:22:46 +03:00
|
|
|
</td></tr>
|
|
|
|
|
1999-09-18 05:05:35 +04:00
|
|
|
<!-- Make Options -->
|
|
|
|
<tr bgcolor="$chrome_color"><td>
|
|
|
|
<font face="Helvetica,Arial"><b>
|
|
|
|
Make options:</b></font><br>
|
|
|
|
</td></tr><tr><td><table><tr><td>
|
|
|
|
<input type="checkbox" name="parallel_build");
|
|
|
|
#print 'checked' if $fillin{MOZ_MAKE_FLAGS} ne $default{MOZ_MAKE_FLAGS};
|
|
|
|
print qq(>
|
|
|
|
Parallel build using
|
|
|
|
<input type='text' name='gmake_flags' value='$fillin{MOZ_MAKE_FLAGS}'
|
|
|
|
size='10'>
|
|
|
|
</td></tr></table>
|
|
|
|
</td></tr>
|
1999-02-20 04:11:02 +03:00
|
|
|
|
|
|
|
</table>
|
|
|
|
</td></tr></table>
|
|
|
|
</td></tr></table>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<font size=+1 face="Helvetica,Arial"><b>
|
1999-03-11 03:10:46 +03:00
|
|
|
Options for "<code>configure</code>" script</b> (updated on the fly)<b>:</b></font><br>
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-03-11 03:10:46 +03:00
|
|
|
<table bgcolor="$chrome_color" cellspacing=0 cellpadding=0 border=0><tr><td>
|
|
|
|
<table bgcolor="#FFFFFF" cellspacing=2 cellpadding=0 border=0><tr><td>
|
|
|
|
<table cellspacing=0 cellpadding=4 border=0>
|
1999-02-20 04:11:02 +03:00
|
|
|
);
|
|
|
|
|
1999-04-15 00:37:03 +04:00
|
|
|
my @unhandled_options = ();
|
|
|
|
|
1999-02-20 04:11:02 +03:00
|
|
|
open(OPTIONS, "m4 webify-configure.m4 $configure_in|")
|
1999-02-19 23:26:29 +03:00
|
|
|
or die "Error parsing configure.in\n";
|
|
|
|
|
1999-02-19 00:27:26 +03:00
|
|
|
foreach (<OPTIONS>) {
|
|
|
|
chomp;
|
1999-02-19 23:17:25 +03:00
|
|
|
($type, $prename, $name, $comment) = split /$field_separator/;
|
|
|
|
($dummy,$dummy2,$help) = split /\s+/, $comment, 3;
|
1999-02-20 04:11:02 +03:00
|
|
|
|
1999-04-15 00:37:03 +04:00
|
|
|
if ($type eq 'header') {
|
1999-02-19 23:17:25 +03:00
|
|
|
&header_option($comment);
|
1999-04-15 00:37:03 +04:00
|
|
|
} elsif ($type eq 'unhandled') {
|
|
|
|
push @unhandled_options, $comment;
|
1999-02-19 23:17:25 +03:00
|
|
|
} else {
|
|
|
|
eval "&${type}_option(\"--$prename-$name\",\"$help\");";
|
1999-02-19 00:27:26 +03:00
|
|
|
}
|
|
|
|
}
|
1999-04-15 00:37:03 +04:00
|
|
|
header_option("Options not handled by Configurator"
|
1999-08-13 19:27:56 +04:00
|
|
|
." (Add them to the .mozconfig script by hand)");
|
1999-04-15 00:37:03 +04:00
|
|
|
foreach $comment (@unhandled_options) {
|
|
|
|
$comment =~ s/\\\$/\$/g;
|
|
|
|
my ($dummy,$option,$help) = split /\s+/, $comment, 3;
|
|
|
|
print "<tr><td> $option</td><td> $help</td></tr>\n";
|
|
|
|
}
|
|
|
|
|
1999-03-11 03:10:46 +03:00
|
|
|
print "</td></tr></table></td></tr>\n";
|
1999-02-19 00:27:26 +03:00
|
|
|
|
|
|
|
print qq(
|
|
|
|
</table>
|
1999-02-19 23:17:25 +03:00
|
|
|
</td></tr></table>
|
|
|
|
</td></tr></table>
|
1999-02-20 10:52:15 +03:00
|
|
|
<table><tr><td>
|
|
|
|
<input type="Submit" value="Preview Build Script">
|
|
|
|
</td></tr></table>
|
1999-02-19 00:27:26 +03:00
|
|
|
</form>
|
1999-08-13 19:57:50 +04:00
|
|
|
|
|
|
|
Questions? See the
|
|
|
|
<a href="http://www.mozilla.org/build/configurator-faq.html">
|
|
|
|
Configurator FAQ</a>.<br>
|
|
|
|
<a href="http://www.mozilla.org/build/unix.html">
|
|
|
|
Back to the Unix Build Instructions</a>
|
1999-04-15 00:37:03 +04:00
|
|
|
<p>
|
|
|
|
<hr align=left width=600>
|
|
|
|
Send questions or comments to
|
|
|
|
<<a href="mailto:slamm\@netscape.com?subject=About the Build Configurator">slamm\@netcape.com</a>>.
|
1999-02-19 00:27:26 +03:00
|
|
|
);
|
1999-04-15 00:37:03 +04:00
|
|
|
|
1999-02-19 23:17:25 +03:00
|
|
|
print "\n</body>\n</html>\n";
|
1999-02-19 00:27:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
sub bool_option {
|
|
|
|
my ($name, $help) = @_;
|
|
|
|
|
1999-03-11 03:10:46 +03:00
|
|
|
print "<tr><td>";
|
1999-03-04 06:07:50 +03:00
|
|
|
print "<INPUT type='checkbox' name='$name' value='yes'";
|
|
|
|
print " CHECKED" if $query->param($name) eq 'yes';
|
|
|
|
print ">";
|
1999-03-11 03:10:46 +03:00
|
|
|
print "$name";
|
|
|
|
print "</td><td> $help</td></tr>";
|
1999-02-19 00:27:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
sub string_option {
|
|
|
|
my ($name, $help) = @_;
|
|
|
|
|
1999-03-11 03:10:46 +03:00
|
|
|
print "<tr><td colspan=2>$name=";
|
1999-03-04 06:07:50 +03:00
|
|
|
print "<INPUT type='text' name='$name'";
|
|
|
|
print " value='".$query->param($name)."'" if defined $query->param($name);
|
|
|
|
print ">";
|
1999-03-11 03:10:46 +03:00
|
|
|
print " $help</td></tr>\n";
|
1999-02-19 00:27:26 +03:00
|
|
|
}
|
1999-02-19 23:17:25 +03:00
|
|
|
|
|
|
|
sub bool_or_string_option {
|
|
|
|
my ($name, $help) = @_;
|
|
|
|
|
|
|
|
print "<tr><td align=right>";
|
|
|
|
print "<INPUT type='checkbox' name='$name'>";
|
|
|
|
print "</td><td>$name";
|
|
|
|
print "</td><td>$help</td></tr>\n";
|
|
|
|
print "<tr><td align=right>$name=</td><td align=left>";
|
|
|
|
print "<INPUT type='text' name='$name'>";
|
|
|
|
print "</td><td>$help</td></tr>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
sub header_option {
|
|
|
|
my ($header) = @_;
|
1999-04-15 00:37:03 +04:00
|
|
|
print "</td></tr></table></td></tr>\n" if $inTable == 1;
|
1999-02-19 23:17:25 +03:00
|
|
|
print qq(<tr bgcolor=$chrome_color><td colspan=3>
|
|
|
|
<b><font face="Arial,Helvetica">
|
|
|
|
$header
|
|
|
|
</font></b></td></tr>
|
|
|
|
);
|
1999-04-15 00:37:03 +04:00
|
|
|
print "<tr><td><table cellspacing=0 cellpadding=0 border=0><tr><td>\n";
|
|
|
|
$inTable = 1;
|
1999-02-19 23:17:25 +03:00
|
|
|
}
|