cvs commit: modperl-2.0/lib/Apache Build.pm
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
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
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
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
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
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
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
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
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
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
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
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
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
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; } }