From: Nicholas Clark Date: Thu, 29 Jan 2009 16:57:34 +0000 (+0000) Subject: Add an explicit --all option to buildext.pl, rather than defaulting to it if X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aaaf44d72fce5980564533b9072da6e594d91d81;p=p5sagit%2Fp5-mst-13.2.git Add an explicit --all option to buildext.pl, rather than defaulting to it if --static and --dynamic are not present. Make it run under strict. --- diff --git a/win32/Makefile b/win32/Makefile index 7c38da0..80acb18 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1078,12 +1078,12 @@ Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static Extensions_clean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) clean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext clean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --all clean + -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --all clean Extensions_realclean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) realclean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext realclean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --all realclean + -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --all realclean #------------------------------------------------------------------------------- diff --git a/win32/buildext.pl b/win32/buildext.pl index e6a374d..eb676f2 100644 --- a/win32/buildext.pl +++ b/win32/buildext.pl @@ -4,7 +4,7 @@ buildext.pl - build extensions =head1 SYNOPSIS - buildext.pl make [-make_opts] dep directory [target] [--static|--dynamic] +ext2 !ext1 + buildext.pl make [-make_opts] dep directory [target] [--static|--dynamic|--all] +ext2 !ext1 E.g. @@ -28,6 +28,7 @@ If '--dynamic' specified, only dynamic extensions will be built. =cut +use strict; use Cwd; use FindExt; use Config; @@ -36,8 +37,7 @@ use Config; # @ARGV with '+' at first position are inclusions # -- are long options. -my %excl, %incl, -my @argv; +my (%excl, %incl, %opts, @argv); foreach (@ARGV) { if (/^!(.*)$/) { @@ -51,10 +51,8 @@ foreach (@ARGV) { } } -my $static = $opts{static}; -my $dynamic = $opts{dynamic}; - -$static = $dynamic = 1 unless $static or $dynamic; +my $static = $opts{static} || $opts{all}; +my $dynamic = $opts{dynamic} || $opts{all}; my $makecmd = shift @argv; my $dep = shift @argv; diff --git a/win32/makefile.mk b/win32/makefile.mk index 4829008..7a06555 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1404,12 +1404,12 @@ Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static Extensions_clean : - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) clean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext clean + -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --all clean + -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --all clean Extensions_realclean : -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) realclean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext realclean + -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --all realclean #-------------------------------------------------------------------------------