Author: stevehay Date: Tue Nov 19 11:36:04 2013 New Revision: 1543392 URL: http://svn.apache.org/r1543392 Log: Import http://perl.apache.org/dist/win32-bin/apxs_win32-0.6.tar.gz
(I searched high and low but could not find versions 0.4 or 0.5 anywhere, hence the jump from version 0.3 to 0.6.) Modified: perl/apxs/trunk/apr_win32.pl perl/apxs/trunk/apu_win32.pl perl/apxs/trunk/apxs_win32 Modified: perl/apxs/trunk/apr_win32.pl URL: http://svn.apache.org/viewvc/perl/apxs/trunk/apr_win32.pl?rev=1543392&r1=1543391&r2=1543392&view=diff ============================================================================== --- perl/apxs/trunk/apr_win32.pl (original) +++ perl/apxs/trunk/apr_win32.pl Tue Nov 19 11:36:04 2013 @@ -35,7 +35,6 @@ my $license = <<'END'; END -my $file = 'apr-config.pl'; my ($prefix, $help); GetOptions('with-apache2=s' => \$prefix, 'help' => \$help) or usage($0); usage($0) if $help; @@ -64,6 +63,7 @@ while (<$inc>) { } } close $inc; +my $file = $vers{MAJOR} < 1 ? "apr-config.pl" : "apr-$vers{MAJOR}-config.pl"; my $dotted = "$vers{MAJOR}.$vers{MINOR}.$vers{PATCH}"; my $apr_libname; @@ -97,8 +97,8 @@ my %apr_args = (APR_MAJOR_VERSION => $ve APR_LIB_TARGET => '', ); -my $apr_usage = << 'EOF'; -Usage: apr-config [OPTION] +my $apr_usage = << "EOF"; +Usage: apr-$vers{MAJOR}-config [OPTION] Known values for OPTION are: --prefix[=DIR] change prefix to DIR @@ -155,7 +155,7 @@ close $fh; my @args = ('pl2bat', $full); system(@args) == 0 or die "system @args failed: $?"; -print qq{apr-config.bat has been created under $ap_dir{bin}.\n\n}; +print qq{$file.bat has been created under $ap_dir{bin}.\n\n}; __DATA__ Modified: perl/apxs/trunk/apu_win32.pl URL: http://svn.apache.org/viewvc/perl/apxs/trunk/apu_win32.pl?rev=1543392&r1=1543391&r2=1543392&view=diff ============================================================================== --- perl/apxs/trunk/apu_win32.pl (original) +++ perl/apxs/trunk/apu_win32.pl Tue Nov 19 11:36:04 2013 @@ -35,7 +35,6 @@ my $license = <<'END'; END -my $file = 'apu-config.pl'; my ($prefix, $help); GetOptions('with-apache2=s' => \$prefix, 'help' => \$help) or usage($0); usage($0) if $help; @@ -64,6 +63,8 @@ while (<$inc>) { } } close $inc; +my $file = $vers{MAJOR} < 1 ? "apu-config.pl" : "apu-$vers{MAJOR}-config.pl"; + my $dotted = "$vers{MAJOR}.$vers{MINOR}.$vers{PATCH}"; my $aprutil_libname; @@ -97,8 +98,8 @@ my %apu_args = (APRUTIL_MAJOR_VERSION => APRUTIL_LIB_TARGET => '', ); -my $apu_usage = << 'EOF'; -Usage: apu-config [OPTION] +my $apu_usage = << "EOF"; +Usage: apu-$vers{MAJOR}-config [OPTION] Known values for OPTION are: --prefix[=DIR] change prefix to DIR @@ -155,7 +156,7 @@ close $fh; my @args = ('pl2bat', $full); system(@args) == 0 or die "system @args failed: $?"; -print qq{apu-config.bat has been created under $ap_dir{bin}.\n\n}; +print qq{$file.bat has been created under $ap_dir{bin}.\n\n}; __DATA__ Modified: perl/apxs/trunk/apxs_win32 URL: http://svn.apache.org/viewvc/perl/apxs/trunk/apxs_win32?rev=1543392&r1=1543391&r2=1543392&view=diff ============================================================================== --- perl/apxs/trunk/apxs_win32 (original) +++ perl/apxs/trunk/apxs_win32 Tue Nov 19 11:36:04 2013 @@ -94,6 +94,7 @@ my $opt_A = 0; my $opt_q = 0; my $opt_h = 0; my $opt_p = 0; +my $opt_v = 0; my $opt_d = 0; # this subroutine is derived from Perl's getopts.pl with the enhancement of @@ -163,7 +164,7 @@ sub Getopts { sub usage { print STDERR <<'END'; Usage: apxs -g [-S <var>=<val>] -n <modname> - apxs -q [-S <var>=<val>] <query> ... + apxs -q [-v] [-S <var>=<val>] <query> ... apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]] [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>] [-Wl,<flags>] [-p] <files> ... @@ -176,9 +177,9 @@ END # option handling my $rc; -($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaApd", @ARGV); +($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaApvd", @ARGV); &usage if ($rc == 0); -&usage if ($#ARGV == -1 and not $opt_g); +&usage if ($#ARGV == -1 and not $opt_g and not $opt_q); &usage if (not $opt_q and not ($opt_g and $opt_n) and not $opt_i and not $opt_c and not $opt_e); @@ -331,8 +332,35 @@ if ($opt_q) { ## ## QUERY INFORMATION ## - my $result = get_vars(@args); - print "$result\n"; + my $result; + if ($#args >= 0) { + $result = get_vars(@args); + print "$result\n"; + } else { + # -q without var name prints all variables and their values + + # Additional -v pretty-prints output + if ($opt_v) { + # Variable names in alphabetic order + my @vars = sort {uc($a) cmp uc($b)} keys %config_vars; + + # Make the left column as wide as the longest variable name + my $width = 0; + foreach (@vars) { + my $l = length $_; + $width = $l unless ($l <= $width); + } + + foreach (@vars) { + printf "%-${width}s = %s\n", $_, $config_vars{$_}; + } + } else { + # Unprettified name=value list + foreach (keys %config_vars) { + print "$_=$config_vars{$_}\n"; + } + } + } } my $apr_bindir = get_vars("APR_BINDIR"); @@ -448,6 +476,9 @@ if ($opt_c) { } push(@cmds, "$CFG_LD $ldflags /out:$dso_file $opt $lo"); + my $manifest = $dso_file . '.manifest'; + push(@cmds, "if exist $manifest mt.exe /manifest $manifest /outputresource:$dso_file;#2"); + # execute the commands &execute_cmds(@cmds);