cvs commit: modperl-2.0/lib/Apache Build.pm

2003-01-31 Thread stas
stas2003/01/31 23:39:43

  Modified:lib/Apache Build.pm
  Log:
  - create MKPATH make variable as we are going to use it more than once
there is no need to test for the existance of the path, before calling
mkpath(), it does no harm if the dir already exists
  - use the MKPATH variable
  
  Revision  ChangesPath
  1.110 +3 -3  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- Build.pm  14 Dec 2002 17:29:34 -  1.109
  +++ Build.pm  1 Feb 2003 07:39:43 -   1.110
  @@ -1052,14 +1052,14 @@
   
   MODPERL_PIC_OBJS = $(MODPERL_O_PIC_FILES) $(MODPERL_XS_O_PIC_FILES)
   
  +MKPATH = $(MODPERL_PERLPATH) -MExtUtils::Command -e mkpath
  +
   all: lib
   
   lib: $(MODPERL_LIB)
   
   install:
  - $(MODPERL_PERLPATH) -e exit ! -d qq{$(MODPERL_AP_LIBEXECDIR)} || \
  - $(MODPERL_PERLPATH) -MExtUtils::Command  \
  - -e mkpath $(MODPERL_AP_LIBEXECDIR)
  + @$(MKPATH) $(MODPERL_AP_LIBEXECDIR)
$(MODPERL_TEST_F) $(MODPERL_LIB_DSO)  \
$(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-08-14 Thread stas

stas2002/08/14 19:10:32

  Modified:lib/Apache Build.pm
  Log:
  make it possible to build mod_perl against the source tree, where apr.h is
  located in srclib/include/apr/ and not include/
  
  Revision  ChangesPath
  1.104 +6 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- Build.pm  14 Aug 2002 02:33:00 -  1.103
  +++ Build.pm  15 Aug 2002 02:10:32 -  1.104
   -765,7 +765,12 
   
   my $dir = $self-ap_includedir;
   
  -my $header = $dir/apr.h;
  +my $header;
  +for my $d ($dir, $dir/../srclib/apr/include) {
  +$header = $d/apr.h;
  +last if -e $header;
  +}
  +
   open my $fh, $header or do {
   error Unable to open $header: $!;
   return undef;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-18 Thread dougm

dougm   2002/06/18 18:26:28

  Modified:lib/Apache Build.pm
  Log:
  need to check ccflags rather than optimize for -DDEBUGGING
  
  Revision  ChangesPath
  1.100 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- Build.pm  17 Jun 2002 19:42:49 -  1.99
  +++ Build.pm  19 Jun 2002 01:26:28 -  1.100
   -285,7 +285,7 
   $val ||= $Config{optimize};
   
   if ($self-{MP_DEBUG}) {
  -return ' ' unless $val =~ /-DDEBUGGING/;
  +return ' ' unless $Config{ccflags} =~ /-DDEBUGGING/;
   }
   
   $val;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-18 Thread dougm

dougm   2002/06/18 18:32:58

  Modified:lib/Apache Build.pm
  Log:
  only win32 has -DDEBUGGING in both optimize and ccflags
  
  Revision  ChangesPath
  1.101 +2 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- Build.pm  19 Jun 2002 01:26:28 -  1.100
  +++ Build.pm  19 Jun 2002 01:32:58 -  1.101
   -252,7 +252,8 
   $fixup-(\$cflags);
   }
   
  -if ($self-{MP_DEBUG}) {
  +if (WIN32 and $self-{MP_DEBUG}) {
  +#only win32 has -DDEBUGGING in both optimize and ccflags
   my $optim = $Config{optimize};
   
   unless ($optim =~ /-DDEBUGGING/) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 10:26:29

  Modified:lib/Apache Build.pm
  Log:
  remove -undefined suppress from ldflags on darwin (should never be there)
  
  Revision  ChangesPath
  1.97  +7 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- Build.pm  30 May 2002 06:00:49 -  1.96
  +++ Build.pm  15 Jun 2002 17:26:29 -  1.97
   -170,7 +170,13 
   my $config = tied %Config;
   my $ldflags = $config-{ldflags};
   
  -$config-{ldflags} = '' if WIN32; #same as lddlflags
  +if (WIN32) {
  +$config-{ldflags} = ''; #same as lddlflags
  +}
  +elsif (DARWIN) {
  +#not sure how this can happen, but it shouldn't
  +$config-{ldflags} =~ s/-undefined suppress//;
  +}
   
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 18:58:50

  Modified:lib/Apache Build.pm
  Log:
  hmm, darwin ldflags fixup was not quite good enough
  
  Revision  ChangesPath
  1.98  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- Build.pm  15 Jun 2002 17:26:29 -  1.97
  +++ Build.pm  16 Jun 2002 01:58:50 -  1.98
   -175,7 +175,10 
   }
   elsif (DARWIN) {
   #not sure how this can happen, but it shouldn't
  -$config-{ldflags} =~ s/-undefined suppress//;
  +my bogus_flags = 'flat_namespace', 'bundle', 'undefined suppress';
  +for my $flag (bogus_flags) {
  +$config-{ldflags} =~ s/-$flag\s*//;
  +}
   }
   
   my $ldopts = ExtUtils::Embed::ldopts();
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-29 Thread dougm

dougm   02/05/29 18:52:55

  Modified:lib/Apache Build.pm
  Log:
  darwin does not like ranlib on mod_perl.so
  
  Revision  ChangesPath
  1.95  +9 -4  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- Build.pm  29 May 2002 03:26:40 -  1.94
  +++ Build.pm  30 May 2002 01:52:55 -  1.95
   -20,6 +20,7 
   use constant HAS_ITHREADS =
   $Config{useithreads}  ($Config{useithreads} eq 'define');
   
  +use constant DARWIN = $^O eq 'darwin';
   use constant WIN32 = $^O eq 'MSWin32';
   use constant MSVC  = WIN32()  ($Config{cc} eq 'cl');
   
   -863,10 +864,14 
   
   sub dynamic_link_default {
   my $self = shift;
  -return $self-dynamic_link_header_default . 'EOF';
  - -o $
  - $(MODPERL_RANLIB) $
  -EOF
  +
  +my $link = $self-dynamic_link_header_default . \t . '-o $';
  +
  +my $ranlib = \t . '$(MODPERL_RANLIB) $';
  +
  +$link .= \n . $ranlib unless DARWIN;
  +
  +$link;
   }
   
   sub dynamic_link_MSWin32 {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-29 Thread dougm

dougm   02/05/29 23:00:49

  Modified:lib/Apache Build.pm
  Log:
  prevent possible fatal warning seen in 5.6.0/darwin in MM-init_others
  
  Revision  ChangesPath
  1.96  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- Build.pm  30 May 2002 01:52:55 -  1.95
  +++ Build.pm  30 May 2002 06:00:49 -  1.96
   -824,6 +824,9 
   $$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
   }
   
  +#help prevent warnings
  +my mm_init_vars = (BASEEXT = '');
  +
   sub make_tools {
   my($self, $fh) = _;
   
   -832,7 +835,7 
   }
   
   require ExtUtils::MakeMaker;
  -my $mm = bless {}, 'MM';
  +my $mm = bless { mm_init_vars }, 'MM';
   $mm-init_others;
   
   for (qw(rm_f mv ld ar cp test_f)) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-23 Thread dougm

dougm   02/05/23 16:36:31

  Modified:lib/Apache Build.pm
  Log:
  leave out libperl dep if it isnt found in the properl place
  
  Revision  ChangesPath
  1.93  +9 -5  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- Build.pm  23 May 2002 02:35:19 -  1.92
  +++ Build.pm  23 May 2002 23:36:31 -  1.93
   -940,11 +940,15 
   print $fh $self-canon_make_attr(lib_$type, $libs{$type});
   }
   
  -print $fh $self-canon_make_attr('libperl',
  - join '/',
  - $self-perl_config('archlibexp'),
  - 'CORE',
  - $self-perl_config('libperl'));
  +my $libperl = join '/',
  +  $self-perl_config('archlibexp'), 'CORE', $self-perl_config('libperl');
  +
  +#this is only used for deps, if libperl has changed, relink mod_perl.so
  +#not all perl dists put libperl where it should be, so just leave this
  +#out if it isn't in the proper place
  +if (-e $libperl) {
  +print $fh $self-canon_make_attr('libperl', $libperl);
  +}
   
   for my $method (qw(ccopts ldopts inc)) {
   print $fh $self-canon_make_attr($method, $self-$method());
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-22 Thread dougm

dougm   02/05/22 19:35:19

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  on hpux with bleedperl $Config{ld} is the fullpath, strip to the basename
  
  Revision  ChangesPath
  1.84  +2 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- Makefile.PL   22 May 2002 02:07:08 -  1.83
  +++ Makefile.PL   23 May 2002 02:35:19 -  1.84
   -344,8 +344,9 
   
   sub os_check_hpux {
   my $ccflags = $build-perl_config('ccflags');
  +my $ld = $build-perl_config('ld');
   
  -if ($build-is_dynamic and $Config{ld} eq 'ld') {
  +if ($build-is_dynamic and $ld eq 'ld') {
   unless ($ccflags =~ /\+z/i) {
   $build-phat_warn(EOF);
   mod_perl is unlikely to link with your libperl, suggestions:
  
  
  
  1.92  +11 -1 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- Build.pm  22 May 2002 01:58:59 -  1.91
  +++ Build.pm  23 May 2002 02:35:19 -  1.92
   -172,7 +172,9 
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
   
  -if ($^O eq 'hpux' and $Config{ld} eq 'ld') {
  +my $ld = $self-perl_config('ld');
  +
  +if ($^O eq 'hpux' and $ld eq 'ld') {
   while ($ldopts =~ s/-Wl,(\S+)/$1/) {
   my $cp = $1;
   (my $repl = $cp) =~ s/,/ /g;
   -275,6 +277,14 
   }
   
   $val;
  +}
  +
  +sub perl_config_ld {
  +my($self, $val) = _;
  +
  +$val ||= $Config{ld};
  +
  +basename $val; #bleedperl hpux value is /usr/bin/ld !
   }
   
   sub perl_config_lddlflags {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-21 Thread dougm

dougm   02/05/21 09:49:53

  Modified:lib/Apache Build.pm
  Log:
  dont bother looking for the ssl includes, we dont use them
  
  Revision  ChangesPath
  1.88  +0 -7  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- Build.pm  21 May 2002 16:48:29 -  1.87
  +++ Build.pm  21 May 2002 16:49:53 -  1.88
   -1066,13 +1066,6 
 push inc, $_ if -d $_;
 }
   
  -my $ssl_dir = $src/../ssl/include;
  -unless (-d $ssl_dir) {
  -my $build = $self-build_config;
  -$ssl_dir = join '/', $self-{MP_SSL_BASE} || '', 'include';
  -}
  -push inc, $ssl_dir if -d $ssl_dir;
  -
   return \@inc;
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-21 Thread dougm

dougm   02/05/21 18:59:00

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  make it possible to change the name of src/modules/perl/Makefile
  in case static build requires a src/modules/perl/Makefile.in
  
  Revision  ChangesPath
  1.82  +12 -8 modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Makefile.PL   21 May 2002 16:19:51 -  1.81
  +++ Makefile.PL   22 May 2002 01:58:59 -  1.82
   -23,6 +23,7 
   use File::Spec::Functions;
   use DirHandle ();
   use File::Copy 'cp';
  +use File::Basename 'basename';
   
   use Apache::Build ();
   use Apache::TestReportPerl ();
   -70,11 +71,14 
   VERSION = $VERSION,
   DIR = get_dirs_with_makefile(remote_makefile_dirs),
   macro = {
  -MODPERL_SRC   = $code-path,
  -PERL  = $build-perl_config('perlpath'),
  -MOD_INSTALL   = ModPerl::MM::mod_install(),
  -APACHE_PREFIX = $build-apxs('-q' = 'prefix'),
  -APACHE_LIBDIR = $build-apxs('-q' = 'libexecdir'),
  +MODPERL_SRC  = $code-path,
  +MODPERL_MAKEFILE = basename($build-default_file('makefile')),
  +MAKE_F   = '$(MAKE) ' . (WIN32 ? '/f' : '-f'),
  +MODPERL_LIBMAKE  = '$(MAKE) -f $(MODPERL_MAKEFILE)',
  +PERL = $build-perl_config('perlpath'),
  +MOD_INSTALL  = ModPerl::MM::mod_install(),
  +APACHE_PREFIX= $build-apxs('-q' = 'prefix'),
  +APACHE_LIBDIR= $build-apxs('-q' = 'libexecdir'),
   },
   clean = {
   FILES = { clean_files() },
   -390,13 +394,13 
$(SHELL) build/make_etags
   
   modperl_lib:
  - cd $(MODPERL_SRC)  $(MAKE)
  + cd $(MODPERL_SRC)  $(MODPERL_LIBMAKE)
   
   modperl_lib_install:
  - cd $(MODPERL_SRC)  $(MAKE) install
  + cd $(MODPERL_SRC)  $(MODPERL_LIBMAKE) install
   
   modperl_src_clean:
  - cd $(MODPERL_SRC)  $(MAKE) clean
  + cd $(MODPERL_SRC)  $(MODPERL_LIBMAKE) clean
   
   EOF
   
  
  
  
  1.91  +6 -3  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- Build.pm  21 May 2002 17:42:39 -  1.90
  +++ Build.pm  22 May 2002 01:58:59 -  1.91
   -9,6 +9,7 
   use Config;
   use Cwd ();
   use File::Spec ();
  +use File::Basename;
   use ExtUtils::Embed ();
   use ModPerl::Code ();
   use ModPerl::BuildOptions ();
   -450,7 +451,7 
   my %default_files = (
   'build_config' = 'lib/Apache/BuildConfig.pm',
   'ldopts' = 'src/modules/perl/ldopts',
  -'makefile' = 'src/modules/perl/Makefile',
  +'makefile' = 'src/modules/perl/Makefile.modperl',
   );
   
   sub clean_files {
   -908,6 +909,8 
   
   print $fh noedit_warning_hash();
   
  +print $fh $self-canon_make_attr('makefile', basename $mf);
  +
   $self-make_tools($fh);
   
   print $fh $self-canon_make_attr('ap_libs', $self-apache_libs);
   -1006,8 +1009,8 
$(MODPERL_CLEAN_FILES) \
$(MODPERL_XS_CLEAN_FILES)
   
  -$(MODPERL_OBJS): $(MODPERL_H_FILES) Makefile
  -$(MODPERL_PIC_OBJS): $(MODPERL_H_FILES) Makefile
  +$(MODPERL_OBJS): $(MODPERL_H_FILES) $(MODPERL_MAKEFILE)
  +$(MODPERL_PIC_OBJS): $(MODPERL_H_FILES) $(MODPERL_MAKEFILE)
   $(MODPERL_LIB): $(MODPERL_LIBPERL)
   
   $(MODPERL_LIBNAME)$(MODPERL_LIB_EXT): $(MODPERL_OBJS)
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-20 Thread dougm

dougm   02/05/20 15:27:30

  Modified:lib/Apache Build.pm
  Log:
  use Apache::TestConfig::which instead of duplicating
  
  Revision  ChangesPath
  1.85  +2 -7  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- Build.pm  19 May 2002 19:46:08 -  1.84
  +++ Build.pm  20 May 2002 22:27:30 -  1.85
   -13,6 +13,7 
   use ModPerl::Code ();
   use ModPerl::BuildOptions ();
   use Apache::TestTrace;
  +use Apache::TestConfig ();
   
   use constant REQUIRE_ITHREADS = grep { $^O eq $_ } qw(MSWin32);
   use constant HAS_ITHREADS =
   -96,7 +97,7 
   #these extra tries are for things built outside of mod_perl
   #e.g. libapreq
   push trys,
  -which('apxs'),
  +Apache::TestConfig::which('apxs'),
   '/usr/local/apache/bin/apxs';
   }
   
   -133,12 +134,6 
   my $cflags = __PACKAGE__-apxs('-q' = 'CFLAGS');
   $cflags =~ s/\/\\\/g;
   $cflags;
  -}
  -
  -sub which {
  -foreach (map { File::Spec-catfile($_, $_[0]) } File::Spec-path) {
  - return $_ if -x;
  -}
   }
   
   #--- Perl Config stuff ---
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-11-21 Thread stas

stas01/11/21 19:46:47

  Modified:lib/Apache Build.pm
  Log:
  doc patch: '-e rebuild' reads better than '-erebuild'
  
  Revision  ChangesPath
  1.74  +4 -4  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Build.pm  2001/11/21 02:35:33 1.73
  +++ Build.pm  2001/11/22 03:46:47 1.74
  @@ -462,7 +462,7 @@
   print Running: $command\n;
   system $command;
   }
  -# % perl -MApache::Build -erebuild
  +# % perl -MApache::Build -e rebuild
   *main::rebuild = \rebuild if $0 eq '-e';
   
   #--- attribute access ---
  @@ -1040,7 +1040,7 @@
   
# rebuild mod_perl with build opts from the previous build
% cd modperl-2.0
  - % perl -MApache::Build -erebuild
  + % perl -MApache::Build -e rebuild
   
   =head1 DESCRIPTION
   
  @@ -1052,12 +1052,12 @@
   chdir to the mod_perl source directory and run:
   
 % cd modperl-2.0
  -  % perl -MApache::Build -erebuild
  +  % perl -MApache::Build -e rebuild
   
   If you want to rebuild not yet installed, but already built mod_perl,
   run from its root directory:
   
  -  % perl -Ilib -MApache::Build -erebuild
  +  % perl -Ilib -MApache::Build -e rebuild
   
   =head1 METHODS
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-11-20 Thread stas

stas01/11/20 18:35:33

  Modified:lib/Apache Build.pm
  Log:
  - add the rebuild() function that allows to reuse the build opts to build
  a new mod_perl
  
  Revision  ChangesPath
  1.73  +26 -0 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- Build.pm  2001/11/02 17:59:05 1.72
  +++ Build.pm  2001/11/21 02:35:33 1.73
  @@ -455,6 +455,16 @@
   close $fh or die failed to write $file: $!;
   }
   
  +sub rebuild {
  +my $self = __PACKAGE__-build_config;
  +my @opts = map { qq[$_='$self-{$_}'] } sort grep /^MP_/,  keys %$self;
  +my $command = perl Makefile.PL @opts;
  +print Running: $command\n;
  +system $command;
  +}
  +# % perl -MApache::Build -erebuild
  +*main::rebuild = \rebuild if $0 eq '-e';
  +
   #--- attribute access ---
   
   sub is_dynamic {
  @@ -1028,10 +1038,26 @@
use Apache::Build ();
my $build = Apache::Build-new;
   
  + # rebuild mod_perl with build opts from the previous build
  + % cd modperl-2.0
  + % perl -MApache::Build -erebuild
  +
   =head1 DESCRIPTION
   
   This module provides methods for locating and parsing bits of Apache
   source code.
  +
  +Since mod_perl remembers what build options were used to build it, you
  +can use this knowledge to rebuild it using the same options. Simply
  +chdir to the mod_perl source directory and run:
  +
  +  % cd modperl-2.0
  +  % perl -MApache::Build -erebuild
  +
  +If you want to rebuild not yet installed, but already built mod_perl,
  +run from its root directory:
  +
  +  % perl -Ilib -MApache::Build -erebuild
   
   =head1 METHODS
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-11-02 Thread dougm

dougm   01/11/02 09:23:54

  Modified:lib/Apache Build.pm
  Log:
  os cflags fixups need happen in perl_ccopts so generated Makefile.PLs get the changes
  
  Revision  ChangesPath
  1.71  +9 -7  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- Build.pm  2001/10/22 03:57:59 1.70
  +++ Build.pm  2001/11/02 17:23:54 1.71
  @@ -195,14 +195,21 @@
   }
   
   sub perl_ccopts {
  -shift-strip_lfs( $Config{ccflags} );
  +my $cflags = shift-strip_lfs( $Config{ccflags} );
  +
  +my $fixup = \{ccopts_$^O};
  +if (defined $fixup) {
  +$fixup-(\$cflags);
  +}
  +
  +$cflags;
   }
   
   sub ccopts_hpux {
   my $cflags = shift;
   #return if $Config{cc} eq 'gcc'; #XXX?
   return if $$cflags =~ /(-Ae|\+e)/;
  -$$cflags .=  -Ae;
  +$$cflags .=  -Ae ;
   }
   
   sub ccopts {
  @@ -210,11 +217,6 @@
   
   my $cflags = $self-perl_ccopts . ExtUtils::Embed::perl_inc() .
$self-ap_ccopts;
  -
  -my $fixup = \{ccopts_$^O};
  -if (defined $fixup) {
  -$fixup-(\$cflags);
  -}
   
   $cflags;
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-11-02 Thread dougm

dougm   01/11/02 09:59:05

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  change install method for libmodperl.so: now done via src/modules/perl/Makefile
  install target
  
  Revision  ChangesPath
  1.53  +10 -11modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- Makefile.PL   2001/11/02 17:33:46 1.52
  +++ Makefile.PL   2001/11/02 17:59:05 1.53
  @@ -291,6 +291,9 @@
   modperl_lib:
cd $(MODPERL_SRC)  $(MAKE)
   
  +modperl_lib_install:
  + cd $(MODPERL_SRC)  $(MAKE) install
  +
   modperl_src_clean:
cd $(MODPERL_SRC)  $(MAKE) clean
   
  @@ -299,6 +302,13 @@
   $string;
   }
   
  +sub MY::install {
  +my $self = shift;
  +my $string = $self-MM::install(@_);
  +ModPerl::MM::add_dep(\$string, pure_install = 'modperl_lib_install');
  +$string;
  +}
  +
   sub MY::clean {
   my $self = shift;
   my $string = $self-MM::clean(@_);
  @@ -317,17 +327,6 @@
   
   sub MY::post_initialize {
   my $self = shift;
  -
  -#XXX: MakeMaker will try to unlink $(APACHE_LIBDIR)/$MODPERL_LIB
  -#during 'make' and probably 'make clean' as well
  -#need to find another way to install libmodperl.so
  -
  -# install libmodperl.so
  -#if ($build-{MP_USE_DSO}) {
  -#my $MODPERL_LIB = join '.', $build-{MP_LIBNAME}, 'so';
  -#$self-{PM}-{src/modules/perl/$MODPERL_LIB} =
  -#\$(APACHE_LIBDIR)/$MODPERL_LIB;
  -#}
   
   #up one from the Apache2/ subdir
   #so it can be found for 'use Apache2 ()'
  
  
  
  1.72  +10 -1 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Build.pm  2001/11/02 17:23:54 1.71
  +++ Build.pm  2001/11/02 17:59:05 1.72
  @@ -738,7 +738,7 @@
   my $mm = bless {}, 'MM';
   $mm-init_others;
   
  -for (qw(rm_f mv ld ar)) {
  +for (qw(rm_f mv ld ar cp test_f)) {
   my $val = $mm-{\U$_};
   if ($val) {
   mm_replace(\$val);
  @@ -858,6 +858,11 @@
$self-{MODPERL_LIB_SHARED} :
$self-{MODPERL_LIB_STATIC});
   
  +for my $q (qw(LIBEXECDIR)) {
  +print $fh $self-canon_make_attr(AP_$q,
  + $self-apxs(-q = $q));
  +}
  +
   my $xs_targ = $self-make_xs($fh);
   
   print $fh 'EOF';
  @@ -872,6 +877,10 @@
   all: lib
   
   lib: $(MODPERL_LIB)
  +
  +install:
  + $(MODPERL_TEST_F) $(MODPERL_LIB_SHARED)  \
  + $(MODPERL_CP) $(MODPERL_LIB_SHARED) $(MODPERL_AP_LIBEXECDIR)
   
   .SUFFIXES: .xs .c $(MODPERL_OBJ_EXT) .lo .i .s
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-21 Thread dougm

dougm   01/10/20 23:57:07

  Modified:lib/Apache Build.pm
  Log:
  include -def:modperl_ithreads.def for win32
  
  Revision  ChangesPath
  1.63  +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- Build.pm  2001/10/21 06:43:34 1.62
  +++ Build.pm  2001/10/21 06:57:07 1.63
  @@ -765,7 +765,7 @@
   sub dynamic_link_MSWin32 {
   my $self = shift;
   my @defs = map -def:$self-{cwd}/xs/modperl$_.def,
  -(, _inline);
  +(, _inline, _ithreads);
   return $self-dynamic_link_header_default .
  @defs . 'EOF';
-out:$@
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-21 Thread dougm

dougm   01/10/21 20:49:49

  Modified:lib/Apache Build.pm
  Log:
  cosmetic: add missing \t in win32 Makefile
  
  Revision  ChangesPath
  1.69  +1 -3  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Build.pm  2001/10/22 01:38:06 1.68
  +++ Build.pm  2001/10/22 03:49:49 1.69
  @@ -775,9 +775,7 @@
   my $self = shift;
   my $defs = $self-export_files_MSWin32;
   return $self-dynamic_link_header_default .
  -   $defs . 'EOF';
  - -out:$@
  -EOF
  +   \t$defs . ' -out:$@';
   }
   
   sub dynamic_link {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-21 Thread dougm

dougm   01/10/21 20:57:59

  Modified:lib/Apache Build.pm
  Log:
  clean win32 files (libmodperl.{lib,exp}
  
  Revision  ChangesPath
  1.70  +3 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Build.pm  2001/10/22 03:49:49 1.69
  +++ Build.pm  2001/10/22 03:57:59 1.70
  @@ -899,7 +899,9 @@
-c $*.c  $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
   
   clean:
  - $(MODPERL_RM_F) *.a *.so *.xsc *$(MODPERL_OBJ_EXT) *.lo *.i *.s \
  + $(MODPERL_RM_F) *.a *.so *.xsc \
  + $(MODPERL_LIBNAME).exp $(MODPERL_LIBNAME).lib \
  + *$(MODPERL_OBJ_EXT) *.lo *.i *.s \
$(MODPERL_CLEAN_FILES) \
$(MODPERL_XS_CLEAN_FILES)
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-20 Thread dougm

dougm   01/10/20 22:24:52

  Modified:lib/Apache Build.pm
  Log:
  avoid use of unintialized value
  
  Revision  ChangesPath
  1.60  +12 -2 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- Build.pm  2001/10/21 04:47:47 1.59
  +++ Build.pm  2001/10/21 05:24:52 1.60
  @@ -707,6 +707,11 @@
 (qw(cc cpprun rm ranlib lib_ext obj_ext cccdlflags lddlflags),
  values %perl_config_pm_alias);
   
  +sub mm_replace {
  +my $val = shift;
  +$$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
  +}
  +
   sub make_tools {
   my($self, $fh) = @_;
   
  @@ -725,8 +730,13 @@
   
   for (qw(rm_f mv ld ar)) {
   my $val = $mm-{\U$_};
  -$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
  -print $fh $self-canon_make_attr($_ = $val || $Config{$_});
  +if ($val) {
  +mm_replace(\$val);
  +}
  +else {
  +$val = $Config{$_};
  +}
  +print $fh $self-canon_make_attr($_ = $val);
   }
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-20 Thread dougm

dougm   01/10/20 19:50:15

  Modified:lib/Apache Build.pm
  Log:
  use more Config.pm/MakeMaker variables to make win32 happier
  
  Revision  ChangesPath
  1.55  +8 -8  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Build.pm  2001/10/20 18:59:28 1.54
  +++ Build.pm  2001/10/21 02:50:15 1.55
  @@ -704,7 +704,7 @@
   my $mm_replace = join '|', keys %perl_config_pm_alias;
   
   my @perl_config_pm =
  -  (qw(cc cpprun ld ar rm ranlib lib_ext dlext cccdlflags lddlflags),
  +  (qw(cc cpprun rm ranlib lib_ext dlext obj_ext cccdlflags lddlflags),
  values %perl_config_pm_alias);
   
   sub make_tools {
  @@ -723,7 +723,7 @@
   my $mm = bless {}, 'MM';
   $mm-init_others;
   
  -for (qw(RM_F MV)) {
  +for (qw(RM_F MV LD AR)) {
   my $val = $mm-{$_};
   $val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
   print $fh $self-canon_make_attr($_ = $val);
  @@ -797,13 +797,13 @@
$(MODPERL_PIC_OBJS) $(MODPERL_LDOPTS)
$(MODPERL_RANLIB) $@
   
  -.SUFFIXES: .xs .c .o .lo .i .s
  +.SUFFIXES: .xs .c $(MODPERL_OBJ_EXT) .lo .i .s
   
   .c.lo:
$(MODPERL_CC) $(MODPERL_CCFLAGS_SHLIB) \
  - -c $  $(MODPERL_MV) $*.o $*.lo
  + -c $  $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
   
  -.c.o:
  +.c$(MODPERL_OBJ_EXT):
$(MODPERL_CC) $(MODPERL_CCFLAGS) -c $
   
   .c.i:
  @@ -815,17 +815,17 @@
   .xs.c:
$(MODPERL_XSUBPP) $*.xs $@
   
  -.xs.o:
  +.xs$(MODPERL_OBJ_EXT):
$(MODPERL_XSUBPP) $*.xs $*.c
$(MODPERL_CC) $(MODPERL_CCFLAGS) -c $*.c
   
   .xs.lo:
$(MODPERL_XSUBPP) $*.xs $*.c
$(MODPERL_CC) $(MODPERL_CCFLAGS_SHLIB) \
  - -c $*.c  $(MODPERL_MV) $*.o $*.lo
  + -c $*.c  $(MODPERL_MV) $*$(MODPERL_OBJ_EXT) $*.lo
   
   clean:
  - $(MODPERL_RM_F) *.a *.so *.xsc *.o *.lo *.i *.s \
  + $(MODPERL_RM_F) *.a *.so *.xsc *$(MODPERL_OBJ_EXT) *.lo *.i *.s \
$(MODPERL_CLEAN_FILES) \
$(MODPERL_XS_CLEAN_FILES)
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-11 Thread dougm

dougm   01/10/11 12:32:43

  Modified:lib/Apache Build.pm
  Log:
  fixup ldopts for hpux
  
  Revision  ChangesPath
  1.48  +8 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Build.pm  2001/09/13 02:01:31 1.47
  +++ Build.pm  2001/10/11 19:32:43 1.48
  @@ -127,6 +127,14 @@
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
   
  +if ($^O eq 'hpux' and $Config{ld} eq 'ld') {
  +while ($ldopts =~ s/-Wl,(\S+)/$1/) {
  +my $cp = $1;
  +(my $repl = $cp) =~ s/,/ /g;
  +$ldopts =~ s/\Q$cp/$repl/;
  +}
  +}
  +
   if ($self-{MP_USE_GTOP}) {
   $ldopts .= $self-gtop_ldopts;
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-10-11 Thread dougm

dougm   01/10/11 17:23:51

  Modified:lib/Apache Build.pm
  Log:
  fixup hpux cflags
  
  Revision  ChangesPath
  1.49  +16 -1 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Build.pm  2001/10/11 19:32:43 1.48
  +++ Build.pm  2001/10/12 00:23:50 1.49
  @@ -178,10 +178,25 @@
   $ccopts;
   }
   
  +sub ccopts_hpux {
  +my $cflags = shift;
  +#return if $Config{cc} eq 'gcc'; #XXX?
  +return if $$cflags =~ /(-Ae|\+e)/;
  +$$cflags .=  -Ae;
  +}
  +
   sub ccopts {
   my($self) = @_;
  +
  +my $cflags = $self-strip_lfs(ExtUtils::Embed::ccopts()) .
  +  $self-ap_ccopts;
  +
  +my $fixup = \{ccopts_$^O};
  +if (defined $fixup) {
  +$fixup-(\$cflags);
  +}
   
  -$self-strip_lfs(ExtUtils::Embed::ccopts()) . $self-ap_ccopts;
  +$cflags;
   }
   
   sub perl_config {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-09-12 Thread dougm

dougm   01/09/12 19:01:31

  Modified:lib/Apache Build.pm
  Log:
  cache apxs queries
  
  Revision  ChangesPath
  1.47  +13 -1 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Build.pm  2001/08/26 03:38:27 1.46
  +++ Build.pm  2001/09/13 02:01:31 1.47
  @@ -38,7 +38,19 @@
   
   sub apxs {
   my $self = shift;
  +
  +my $is_query = (@_ == 2)  ($_[0] eq '-q');
  +
   $self = $self-build_config unless ref $self;
  +
  +my $query_key;
  +if ($is_query) {
  +$query_key = 'APXS_' . $_[1];
  +if ($self-{$query_key}) {
  +return $self-{$query_key};
  +}
  +}
  +
   my $apxs;
   my @trys = ($Apache::Build::APXS,
   $self-{MP_APXS},
  @@ -74,7 +86,7 @@
   }
   }
   
  -$val;
  +$self-{$query_key} = $val;
   }
   
   sub apxs_cflags {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-05-13 Thread dougm

dougm   01/05/13 19:41:50

  Modified:lib/Apache Build.pm
  Log:
  add new -Dthinger so we compile when apache is built with maintainer mode
  
  Revision  ChangesPath
  1.44  +1 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Build.pm  2001/04/27 21:12:25 1.43
  +++ Build.pm  2001/05/14 02:41:49 1.44
  @@ -123,6 +123,7 @@
   if ($self-perl_config('gccversion')) {
   #same as --with-maintainter-mode
   $ccopts .=  $Wall -DAP_DEBUG;
  +$ccopts .=  -DAP_HAVE_DESIGNATED_INITIALIZER;
   }
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-04-27 Thread dougm

dougm   01/04/27 14:12:26

  Modified:lib/Apache Build.pm
  Log:
  warn if apxs query failes
  
  Revision  ChangesPath
  1.43  +3 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Build.pm  2001/04/20 17:09:16 1.42
  +++ Build.pm  2001/04/27 21:12:25 1.43
  @@ -57,7 +57,9 @@
   
   return '' unless $apxs and -x $apxs;
   
  -qx($apxs @_ 2/dev/null);
  +my $val = qx($apxs @_ 2/dev/null);
  +warn ERROR: `$apxs query @_' failed\n unless $val;
  +$val;
   }
   
   sub apxs_cflags {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-04-20 Thread dougm

dougm   01/04/20 10:09:20

  Modified:lib/Apache Build.pm
  Log:
  prevent warning
  
  Revision  ChangesPath
  1.42  +1 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Build.pm  2001/04/10 22:52:36 1.41
  +++ Build.pm  2001/04/20 17:09:16 1.42
  @@ -440,6 +440,7 @@
$self-default_dir,
'../httpd-2.0')
 {
  +  next unless $src_dir;
 next unless (-d $src_dir || -l $src_dir);
 next if $seen{$src_dir}++;
 push @dirs, $src_dir;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-04-03 Thread dougm

dougm   01/04/03 22:27:59

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  do a better job of finding ap_release.h to parse the server version and give more 
diagnostics if it fails
  
  Revision  ChangesPath
  1.31  +6 -0  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Makefile.PL   2001/04/02 09:17:40 1.30
  +++ Makefile.PL   2001/04/04 05:27:59 1.31
  @@ -52,6 +52,12 @@
   }
   
   my $httpd_version = $build-httpd_version;
  +unless ($httpd_version) {
  +$build-phat_warn(EOF);
  +Unable to determine server version, attempting to continue..
  +EOF
  +$httpd_version = 'unknown';
  +}
   
   printf "Configuring Apache/%s mod_perl/%s Perl/v%vd\n",
 $httpd_version, $VERSION, $^V;
  
  
  
  1.40  +11 -9 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- Build.pm  2001/04/02 07:37:36 1.39
  +++ Build.pm  2001/04/04 05:27:59 1.40
  @@ -418,11 +418,13 @@
   }
   }
   
  -unless ($dir and -d $dir) {
  -for (@INC) {
  -last if -d ($dir = "$_/auto/Apache/include");
  -}
  -}
  +# we not longer install Apache headers, so dont bother looking in @INC
  +# might end up finding 1.x headers anyhow
  +#unless ($dir and -d $dir) {
  +#for (@INC) {
  +#last if -d ($dir = "$_/auto/Apache/include");
  +#}
  +#}
   
   return $self-{dir} = $dir;
   }
  @@ -450,16 +452,16 @@
   sub ap_includedir  {
   my($self, $d) = @_;
   
  -$d ||= $self-dir;
  -
   return $self-{ap_includedir}
 if $self-{ap_includedir} and -d $self-{ap_includedir};
  +
  +$d ||= $self-apxs('-q' = 'INCLUDEDIR') || $self-dir;
   
  -if (-e "$d/include/httpd.h") {
  +if (-e "$d/include/ap_release.h") {
   return $self-{ap_includedir} = "$d/include";
   }
   
  -$self-{ap_includedir} = $self-apxs('-q' = 'INCLUDEDIR');
  +$self-{ap_includedir} = $d;
   }
   
   #--- parsing apache *.h files ---
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm ParseSource.pm

2001-03-04 Thread dougm

dougm   01/03/04 15:22:51

  Modified:lib/Apache Build.pm ParseSource.pm
  Log:
  look in MP_INCLUDE_DIR when scanning source
  Apache::Build::AUTOLOAD for accessing MP_* data
  
  Revision  ChangesPath
  1.35  +15 -4 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Build.pm  2001/03/04 19:41:56 1.34
  +++ Build.pm  2001/03/04 23:22:49 1.35
  @@ -13,7 +13,20 @@
   use constant IS_MOD_PERL_BUILD = grep { -e "$_/lib/mod_perl.pm" } qw(. ..);
   
   our $VERSION = '0.01';
  +our $AUTOLOAD;
   
  +sub AUTOLOAD {
  +my $self = shift;
  +my $name = uc ((split '::', $AUTOLOAD)[-1]);
  +unless ($name =~ /^MP_/) {
  +die "no such method: $AUTOLOAD";
  +}
  +unless ($self-{$name}) {
  +return wantarray ? () : undef;
  +}
  +return wantarray ? (split /\s+/, $self-{$name}) : $self-{$name};
  +}
  +
   #--- apxs stuff ---
   
   our $APXS;
  @@ -784,6 +797,8 @@
   my $os = is_win32 ? 'win32' : 'unix';
   my @inc = $self-file_path("src/modules/perl", "xs");
   
  +push @inc, $self-mp_include_dir;
  +
   my $ainc = $self-apxs('-q' = 'INCLUDEDIR');
   if (-d $ainc) {
   push @inc, $ainc;
  @@ -804,10 +819,6 @@
   $ssl_dir = join '/', $self-{MP_SSL_BASE} || '', 'include';
   }
   push @inc, $ssl_dir if -d $ssl_dir;
  -
  -if ($self-{MP_INCLUDE_DIR}) {
  -push @inc, split /\s+/, $self-{MP_INCLUDE_DIR};
  -}
   
   return \@inc;
   }
  
  
  
  1.11  +19 -13modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ParseSource.pm2001/03/03 23:08:58 1.10
  +++ ParseSource.pm2001/03/04 23:22:49 1.11
  @@ -10,7 +10,7 @@
   my $class = shift;
   
   my $self = bless {
  -config = Apache::Build-new,
  +config = Apache::Build-build_config,
   @_,
   }, $class;
   
  @@ -65,7 +65,11 @@
   bless $c, 'Apache::ParseSource::Scan';
   }
   
  -sub include_dir { shift-config-apxs(-q = 'INCLUDEDIR') }
  +sub include_dirs {
  +my $self = shift;
  +($self-config-apxs(-q = 'INCLUDEDIR'),
  + $self-config-mp_include_dir);
  +}
   
   sub includes { shift-config-includes }
   
  @@ -76,24 +80,26 @@
   
   require File::Find;
   
  -my $dir = $self-include_dir;
  +my(@dirs) = $self-include_dirs;
   
  -unless (-d $dir) {
  +unless (-d $dirs[0]) {
   die "could not find include directory";
   }
   
   my @includes;
   my $unwanted = join '|', qw(ap_listen internal);
   
  -File::Find::finddepth({
  -   wanted = sub {
  -   return unless /\.h$/;
  -   return if /($unwanted)/o;
  -   my $dir = $File::Find::dir;
  -   push @includes, "$dir/$_";
  -   },
  -   follow = 1,
  -  }, $dir);
  +for my $dir (@dirs) {
  +File::Find::finddepth({
  +   wanted = sub {
  +   return unless /\.h$/;
  +   return if /($unwanted)/o;
  +   my $dir = $File::Find::dir;
  +   push @includes, "$dir/$_";
  +   },
  +   follow = 1,
  +  }, $dir);
  +}
   
   #include apr_*.h before the others
   my @wanted = grep { /apr_\w+\.h$/ } @includes;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-02-08 Thread dougm

dougm   01/02/08 11:30:56

  Modified:lib/Apache Build.pm
  Log:
  version has moved to ap_release.h
  
  Revision  ChangesPath
  1.30  +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Build.pm  2001/02/08 19:20:18 1.29
  +++ Build.pm  2001/02/08 19:30:44 1.30
  @@ -534,7 +534,7 @@
   return $v;
   }
   
  -open my $fh, "$dir/httpd.h" or return undef;
  +open my $fh, "$dir/ap_release.h" or return undef;
   my $version;
   
   while($fh) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2000-06-11 Thread dougm

dougm   00/06/11 20:25:04

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  a few tweaks
  
  Revision  ChangesPath
  1.21  +2 -4  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Makefile.PL   2000/05/26 18:35:15 1.20
  +++ Makefile.PL   2000/06/12 03:25:04 1.21
  @@ -52,7 +52,7 @@
 $httpd_version, $VERSION, $^V;
   
   for (@{ clean_files() }) {
  -unlink;
  +print "unlink...$_\n" if -e $_  unlink;
   }
   
   #ModPerl::MM will use Apache::BuildConfig in subdir/Makefile.PL's
  @@ -61,10 +61,8 @@
   
   sub post_configure {
   
  -#didn't exist until configure()
  -require Apache::BuildConfig;
   #now have any data subdir/Makefile.PL's save, e.g. XS
  -$build = Apache::BuildConfig-new;
  +$build = Apache::Build-build_config;
   
   $build-write_src_makefile;
   $build-save_ldopts;
  
  
  
  1.20  +7 -2  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Build.pm  2000/06/09 04:30:41 1.19
  +++ Build.pm  2000/06/12 03:25:04 1.20
  @@ -520,7 +520,7 @@
   my $typemap = $self-file_path('src/modules/perl/typemap');
   if (-e $typemap) {
   $xsubpp .= join ' ',
  -  '-typemap', $typemap;
  +  ' -typemap', $typemap;
   }
   
   $xsubpp;
  @@ -564,7 +564,7 @@
   }
   
   my @perl_config_pm =
  -  qw(cc ld ar rm ranlib lib_ext dlext cccdlflags lddlflags optimize
  +  qw(cc ld ar rm ranlib lib_ext dlext cccdlflags lddlflags
perlpath privlibexp);
   
   sub make_tools {
  @@ -574,6 +574,11 @@
   
   for (@perl_config_pm) {
   print $fh $self-canon_make_attr($_, $self-perl_config($_));
  +}
  +unless ($self-{MP_DEBUG}) {
  +for (qw(optimize)) {
  +print $fh $self-canon_make_attr($_, $self-perl_config($_));
  +}
   }
   
   print $fh $self-canon_make_attr('RM_F' = #XXX
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2000-05-30 Thread dougm

dougm   00/05/30 11:34:47

  Modified:lib/Apache Build.pm
  Log:
  untabify
  
  Revision  ChangesPath
  1.18  +2 -2  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Build.pm  2000/05/30 18:33:20 1.17
  +++ Build.pm  2000/05/30 18:34:45 1.18
  @@ -545,8 +545,8 @@
   my $version;
   
   while($fh) {
  - next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/;
  - $version = $1;
  +next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/;
  +$version = $1;
   last;
   }