From: Nicholas Clark Date: Wed, 28 Jan 2009 22:55:26 +0000 (+0000) Subject: Pass $(MAKE) as one quoted commandline argument, to converge with make_ext.pl X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ed969f8dc7e9744ad177a35c99ce43a1bcb63a6;p=p5sagit%2Fp5-mst-13.2.git Pass $(MAKE) as one quoted commandline argument, to converge with make_ext.pl --- diff --git a/win32/Makefile b/win32/Makefile index e3104eb..7c38da0 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1063,27 +1063,27 @@ MakePPPort_clean: #------------------------------------------------------------------------------- Extensions: buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic - -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic + -if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --dynamic Extensions_reonly: buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic +re - -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic +re + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic +re + -if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --dynamic +re Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static - -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --static + -if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --static $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static Extensions_clean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext 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 Extensions_realclean: - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext 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 #------------------------------------------------------------------------------- diff --git a/win32/buildext.pl b/win32/buildext.pl index 675523d..e6a374d 100644 --- a/win32/buildext.pl +++ b/win32/buildext.pl @@ -56,12 +56,22 @@ my $dynamic = $opts{dynamic}; $static = $dynamic = 1 unless $static or $dynamic; -my $make = shift @argv; -$make .= " " . shift @argv while $argv[0] =~ /^-/; +my $makecmd = shift @argv; my $dep = shift @argv; my $dir = shift @argv; my $targ = shift @argv; +my $make; +if (defined($makecmd) and $makecmd =~ /^MAKE=(.*)$/) { + $make = $1; +} +else { + print "ext/util/make_ext: WARNING: Please include MAKE=\$(MAKE)\n"; + print "\tin your call to make_ext. See ext/util/make_ext for details.\n"; + exit(1); +} + + (my $here = getcwd()) =~ s{/}{\\}g; my $perl = $^X; if ($perl =~ m#^\.\.#) { diff --git a/win32/makefile.mk b/win32/makefile.mk index db8ba38..4829008 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1389,27 +1389,27 @@ MakePPPort_clean: #------------------------------------------------------------------------------- Extensions : buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic - -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic + -if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --dynamic Extensions_reonly : buildext.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --dynamic +re - -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --dynamic +re + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --dynamic +re + -if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --dynamic +re Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM) $(XCOPY) ..\*.h $(COREDIR)\*.* - $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) --static - -if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext --static + $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) $(EXTDIR) --static + -if exist ext $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(PERLDEP) ext --static $(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static Extensions_clean : - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) clean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext 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 Extensions_realclean : - -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) $(EXTDIR) realclean - -if exist $(MINIPERL) if exist ext $(MINIPERL) -I..\lib buildext.pl $(MAKE) $(PERLDEP) ext 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 #-------------------------------------------------------------------------------