stas 2003/10/07 11:28:38
Modified: lib/ModPerl BuildOptions.pm
. Changes
Log:
fix the Makefile.PL option parser to support overriding of certain
build options, in addition to appending to them (.e.g. now MP_LIBNAME
is overridable)
Submitted by: Andrew Wyllie <[EMAIL PROTECTED]>
Revision Changes Path
1.22 +35 -25 modperl-2.0/lib/ModPerl/BuildOptions.pm
Index: BuildOptions.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildOptions.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -u -r1.21 -r1.22
--- BuildOptions.pm 13 Aug 2003 22:54:10 -0000 1.21
+++ BuildOptions.pm 7 Oct 2003 18:28:38 -0000 1.22
@@ -83,10 +83,12 @@
}
}
- if ($self->{$key}) {
- $self->{$key} .= ' ';
+ if ($table->{$key}->{append}){
+ $self->{$key} = join " ", grep $_, $self->{$key}, $val;
+ }
+ else {
+ $self->{$key} = $val;
}
- $self->{$key} .= $val;
print " $key = $val\n" if $opts & VERBOSE;
}
@@ -137,7 +139,7 @@
sub usage {
my $table = table();
- my @opts = map { "$_ - $table->{$_}" } sort keys %$table;
+ my @opts = map { "$_ - $table->{$_}->{val}" } sort keys %$table;
join "\n", @opts;
}
@@ -151,8 +153,8 @@
s/^\s+//; s/\s+$//;
next if /^\#/ || /^$/;
last if /^__END__/;
- my($key, $val) = split /\s+/, $_, 2;
- $table{'MP_' . $key} = $val;
+ my($key, $append, $val) = split /\s+/, $_, 3;
+ $table{'MP_' . $key} = { append => $append, val => $val };
}
return \%table;
@@ -166,24 +168,32 @@
1;
+# __DATA__ format:
+# key append description
+# where:
+# key: is the option name
+# append: is whether we want to replace a default option (0)
+# or append the arg to the option (1)
+# desc: description for this option
+
__DATA__
+USE_GTOP 0 Link with libgtop and enable libgtop reporting
+DEBUG 0 Turning on debugging (-g -lperld) and tracing
+MAINTAINER 0 Maintainer mode: DEBUG=1 -DAP_DEBUG -Wall ...
+CCOPTS 1 Add to compiler flags
+TRACE 0 Turn on tracing
+USE_DSO 0 Build mod_perl as a dso
+USE_STATIC 0 Build mod_perl static
+INST_APACHE2 0 Install *.pm relative to Apache2/ directory
+PROMPT_DEFAULT 0 Accept default value for all would-be prompts
+OPTIONS_FILE 0 Read options from given file
+STATIC_EXTS 0 Build Apache::*.xs as static extensions
+APXS 0 Path to apxs
+AP_PREFIX 0 Apache installation or source tree prefix
+APR_CONFIG 0 Path to apr-config
+XS_GLUE_DIR 1 Directories containing extension glue
+INCLUDE_DIR 1 Add directories to search for header files
+GENERATE_XS 0 Generate XS code based on httpd version
+LIBNAME 0 Name of the modperl dso library (default is mod_perl)
+COMPAT_1X 0 Compile-time mod_perl 1.0 backcompat (default is on)
-USE_GTOP Link with libgtop and enable libgtop reporting
-DEBUG Turning on debugging (-g -lperld) and tracing
-MAINTAINER Maintainer mode: DEBUG=1 -DAP_DEBUG -Wall ...
-CCOPTS Add to compiler flags
-TRACE Turn on tracing
-USE_DSO Build mod_perl as a dso
-USE_STATIC Build mod_perl static
-INST_APACHE2 Install *.pm relative to Apache2/ directory
-PROMPT_DEFAULT Accept default value for all would-be prompts
-OPTIONS_FILE Read options from given file
-STATIC_EXTS Build Apache::*.xs as static extensions
-APXS Path to apxs
-AP_PREFIX Apache installation or source tree prefix
-APR_CONFIG Path to apr-config
-XS_GLUE_DIR Directories containing extension glue
-INCLUDE_DIR Add directories to search for header files
-GENERATE_XS Generate XS code based on httpd version
-LIBNAME Name of the modperl dso library (default is mod_perl)
-COMPAT_1X Compile-time mod_perl 1.0 backcompat (default is on)
1.229 +4 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -u -r1.228 -r1.229
--- Changes 7 Oct 2003 01:04:13 -0000 1.228
+++ Changes 7 Oct 2003 18:28:38 -0000 1.229
@@ -12,6 +12,10 @@
=item 1.99_11-dev -
+fix the Makefile.PL option parser to support overriding of certain
+build options, in addition to appending to them (.e.g. now MP_LIBNAME
+is overridable) [Andrew Wyllie <[EMAIL PROTECTED]>]
+
make sure that connection filters won't be inserted as request filters [Stas]
Prevent the 'Use of uninitialized value.' warning when