diff --git a/webtools/build/config.cgi b/webtools/build/config.cgi index eaf1ca316e9f..8dcb22a98ceb 100755 --- a/webtools/build/config.cgi +++ b/webtools/build/config.cgi @@ -53,32 +53,9 @@ print "Content-type: text/html\n\n"; ######################################################### sub parse_params { - if ($query->param('nspr_option') eq 'userdefined') { - my $nspr_dir = $query->param('nspr_dir'); - $nspr_dir =~ s@/$@@; - $nspr_dir =~ s@/lib$@@; - $query->param(-name=>'--with-nspr', - -values=>[$nspr_dir]); - } - #if ($query->param('nspr_option') eq 'rpm') { - # $query->param(-name=>'--with-nspr', - # -values=>['/usr']); - #} - if ($query->param('nspr_option') eq 'tip') { - $query->param(-name=>'--with-nspr', - -values=>['@OBJDIR@/nspr']); - } - if ($query->param('debug_option') eq 'userdefined') { - $query->param(-name=>'--enable-debug', - -values=>[$query->param('debug_dirs')]); - } - if ($query->param('pthreads_'.$query->param('nspr_option')) eq 'yes') { - $query->param(-name=>'--with-pthreads', - -values=>['yes']); - } - if ($query->param('debug_option') eq 'yes') { - $query->param(-name=>'--enable-debug', - -values=>['yes']); + if ($query->param('MOZ_OBJDIR') eq '@TOPSRCDIR@') { + $query->param(-name=>'MOZ_OBJDIR', + -values=>['']); } } @@ -156,24 +133,20 @@ sub print_script_preview { Save the script, then build the tree as follows,   - 1. cvs co mozilla/client.mk + 1. cvs co mozilla/client.mk - 2. cd mozilla + 2. cd mozilla - 3. gmake -f client.mk
+ 3. gmake -f client.mk
- (default targets = checkout build) + (default targets: checkout depend build)   -Here is a shortcut you can use to run viewer -or apprunner when the tree is built, - - 1. cd <objdir> - - 2a. gmake run_viewer - - 2b. gmake run_apprunner +If you do not want to use client.mk, +then use your usual build steps.
+configure will +pick up the options in your .mozconfig script.

Check out the Build Configuator FAQ for more information. @@ -195,10 +168,6 @@ sub print_script { print "#\n"; print "\n"; - print "# Options for client.mk.\n"; - print "# Note: client.mk also uses the following 'ac_add_options',\n"; - print "# --with-nspr=blah\n"; - print "# --with-pthreads\n"; foreach $param ($query->param()) { if ($param =~ /^MOZ_/) { my $value = $query->param($param); @@ -207,20 +176,26 @@ sub print_script { next if $value eq ''; next if $param eq 'MOZ_CO_MODULE' and $value eq 'SeaMonkeyEditor'; next if $param eq 'MOZ_CO_BRANCH' and $value eq 'HEAD'; + print "# Options for client.mk.\n" if not $have_client_mk_options; print "mk_add_options $param=".$value."\n"; - $need_blank_line = 1; + $have_client_mk_options = 1; } } - print "\n" if $need_blank_line; - print "# Options for 'configure' (same as command-line options).\n"; + print "\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" + if not $have_configure_options; print "ac_add_options $param"; print "=".$query->param($param) if $query->param($param) ne "yes"; print "\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"; + } } sub print_configure_form { @@ -252,15 +227,23 @@ sub print_configure_form { Unix Build Configurator - This form produces a script that you can save and use to configure your - mozilla build. If this form does not have some options you want, you can - add them to the script later. + The mozilla Unix build system is designed to build without any user set + options. However, should you need to configure an option, the + Configurator is here to help. + This form produces a script that you can use to configure your build. + The script saves you the trouble of setting environment + variables for client.mk + or typing command-line options for configure.
+ + Options for "client.mk": +
+ \n" if $inTable == 1; + if ($type eq 'header') { &header_option($comment); - print "\n"; print qq( @@ -415,7 +325,12 @@ sub print_configure_form {
@@ -286,91 +269,12 @@ sub print_configure_form { Object Directory:
- - - - - - -
- mozilla (build in the source tree)
+ mozilla Build in the source tree. (default)
- mozilla/obj-\@CONFIG_GUESS\@ (use directory like  mozilla/obj-i686-pc-linux-gnu)
- + mozilla/obj-\@CONFIG_GUESS\@
Use directory like  mozilla/obj-i686-pc-linux-gnu.
- NSPR and Pthreads:
-
- - NSPR and mozilla can be build either with or without - pthreads (POSIX threads). They should both be build the same way. Selecting Pthreads in the right column will cause mozilla to be built with be threads. - For more information on NSPR and pthreads, check - - the NSPR supported platforms. - -
- - -
- - Build NSPR from the tip (installs in \@OBJDIR\@/nspr) -   - - - Use Pthreads for NSPR and mozilla -
- - NSPR is installed in - -   - - - NSPR was Built with Pthreads, so build mozilla with Pthreads -
-
-
- Debug option:
-
- - Enable debug symbols
- - Disable debug symbols
- - Enable debug symbols, but only for the following directories:
-        - (comma separated, no spaces)
-
@@ -385,6 +289,8 @@ sub print_configure_form { ); + my @unhandled_options = (); + open(OPTIONS, "m4 webify-configure.m4 $configure_in|") or die "Error parsing configure.in\n"; @@ -392,19 +298,23 @@ sub print_configure_form { chomp; ($type, $prename, $name, $comment) = split /$field_separator/; ($dummy,$dummy2,$help) = split /\s+/, $comment, 3; - #$help =~ s/\\\$/\$/g; - next if $name eq 'debug'; - - if ($type eq "header") { - print "
\n"; + } + print "
\n"; - $inTable = 1; + } elsif ($type eq 'unhandled') { + push @unhandled_options, $comment; } else { eval "&${type}_option(\"--$prename-$name\",\"$help\");"; } } + header_option("Options not handled by Configurator" + ." (Add them to the script by hand)"); + foreach $comment (@unhandled_options) { + $comment =~ s/\\\$/\$/g; + my ($dummy,$option,$help) = split /\s+/, $comment, 3; + print "
 $option   $help
+

+


+ Send questions or comments to + <slamm\@netcape.com>. ); + print "\n\n\n"; } @@ -454,9 +369,12 @@ sub bool_or_string_option { sub header_option { my ($header) = @_; + print "\n" if $inTable == 1; print qq( $header ); + print "
\n"; + $inTable = 1; } diff --git a/webtools/build/webify-configure.m4 b/webtools/build/webify-configure.m4 index e28ace1a1497..5bb2d89435d0 100644 --- a/webtools/build/webify-configure.m4 +++ b/webtools/build/webify-configure.m4 @@ -71,6 +71,14 @@ dnl MOZ_ARG_WITH_STRING(NAME, HELP, IF-SET [, ELSE]) define(MOZ_ARG_WITH_STRING, [MOZ_ARG_PRINT(string,with,[$1],[$2])]) +dnl AC_ARG_ENABLE(NAME, HELP, IF-SET [, ELSE]) +define(AC_ARG_ENABLE, +[MOZ_ARG_PRINT(unhandled,enable,[$1],[$2])]) + +dnl AC_ARG_WITH(NAME, HELP, IF-SET [, ELSE]) +define(AC_ARG_WITH, +[MOZ_ARG_PRINT(unhandled,with,[$1],[$2])]) + dnl MOZ_ARG_HEADER(Comment) dnl This is used by webconfig to group options define(MOZ_ARG_HEADER,