diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-01-30 17:53:45 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-01-30 17:57:01 +0000 |
commit | 42fe6305f0858c20b777cec2d43a7e452f8c6168 (patch) | |
tree | 559d4f1e5aa943ee39569f0a29da7c028d12ada5 /win32 | |
parent | 57f7515dc9a5acd33e22f384358bd0fa012de89f (diff) | |
download | perl-42fe6305f0858c20b777cec2d43a7e452f8c6168.tar.gz |
Replace the one file timestamp dependency check with a call to 'make config'
The timestamp check was from the original checkin of buidlext.pl in 2001
(17af6fb0658e86e2f4a472e3392fc688e0c25b43) by Nick I-S.
The 'make config' approach of make_ext was in the 5.000 release.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 10 | ||||
-rw-r--r-- | win32/buildext.pl | 26 | ||||
-rw-r--r-- | win32/makefile.mk | 10 |
3 files changed, 22 insertions, 24 deletions
diff --git a/win32/Makefile b/win32/Makefile index 178517f27e..69f8c78ff6 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1063,22 +1063,22 @@ MakePPPort_clean: #------------------------------------------------------------------------------- Extensions: buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic Extensions_reonly: buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic +re + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic +re Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --static + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --static $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static Extensions_clean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --all clean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --all clean Extensions_realclean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --all realclean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --all realclean #------------------------------------------------------------------------------- diff --git a/win32/buildext.pl b/win32/buildext.pl index eb676f24ca..e7e32ed485 100644 --- a/win32/buildext.pl +++ b/win32/buildext.pl @@ -4,17 +4,17 @@ buildext.pl - build extensions =head1 SYNOPSIS - buildext.pl make [-make_opts] dep directory [target] [--static|--dynamic|--all] +ext2 !ext1 + buildext.pl make [-make_opts] directory [target] [--static|--dynamic|--all] +ext2 !ext1 E.g. - buildext.pl nmake -nologo perldll.def ..\ext + buildext.pl nmake -nologo ..\ext - buildext.pl nmake -nologo perldll.def ..\ext clean + buildext.pl nmake -nologo ..\ext clean - buildext.pl dmake perldll.def ..\ext + buildext.pl dmake ..\ext - buildext.pl dmake perldll.def ..\ext clean + buildext.pl dmake ..\ext clean Will skip building extensions which are marked with an '!' char. Mostly because they still not ported to specified platform. @@ -55,7 +55,6 @@ my $static = $opts{static} || $opts{all}; my $dynamic = $opts{dynamic} || $opts{all}; my $makecmd = shift @argv; -my $dep = shift @argv; my $dir = shift @argv; my $targ = shift @argv; @@ -85,7 +84,6 @@ unless (-f "$pl2bat.bat") { system(@args) unless defined $::Cross::platform; } -my $dmod = -M $dep; chdir($dir) || die "Cannot cd to $dir\n"; (my $ext = getcwd()) =~ s{/}{\\}g; my $code; @@ -109,8 +107,7 @@ foreach $dir (sort @ext) } if (chdir("$ext\\$dir")) { - my $mmod = -M 'Makefile'; - if (!(-f 'Makefile') || $mmod > $dmod) + if (!-f 'Makefile') { print "\nRunning Makefile.PL in $dir\n"; my @perl = ($perl, "-I$here\\..\\lib", 'Makefile.PL', @@ -124,12 +121,13 @@ foreach $dir (sort @ext) print join(' ', @perl), "\n"; $code = system(@perl); warn "$code from $dir\'s Makefile.PL" if $code; - $mmod = -M 'Makefile'; - if ($mmod > $dmod) - { - warn "Makefile $mmod > $dmod ($dep)\n"; - } } + if (!$targ or $targ !~ /clean$/) { + # Give makefile an opportunity to rewrite itself. + # reassure users that life goes on... + system("$make config") + and print "$make config failed, continuing anyway...\n"; + } if ($targ) { print "Making $targ in $dir\n$make $targ\n"; diff --git a/win32/makefile.mk b/win32/makefile.mk index 7cfd451f0f..a01421f654 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1389,22 +1389,22 @@ MakePPPort_clean: #------------------------------------------------------------------------------- Extensions : buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic Extensions_reonly : buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic +re + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic +re Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --static + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --static $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static Extensions_clean : - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --all clean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --all clean Extensions_realclean : - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) realclean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) realclean #------------------------------------------------------------------------------- |