#-------------------------------------------------------------------------------
Extensions: buildext.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
- $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic
+ $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic
Extensions_reonly: buildext.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
- $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic +re
+ $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic +re
Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
- $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --static
+ $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --static
$(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
Extensions_clean:
- -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --all clean
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean
Extensions_realclean:
- -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --all realclean
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=realclean
#-------------------------------------------------------------------------------
=head1 SYNOPSIS
- buildext.pl make [-make_opts] directory [target] [--static|--dynamic|--all] +ext2 !ext1
+ buildext.pl "MAKE=make [-make_opts]" --dir=directory [--target=target] [--static|--dynamic|--all] +ext2 !ext1
E.g.
- buildext.pl nmake -nologo ..\ext
+ buildext.pl "MAKE=nmake -nologo" --dir=..\ext
- buildext.pl nmake -nologo ..\ext clean
+ buildext.pl "MAKE=nmake -nologo" --dir=..\ext --target=clean
- buildext.pl dmake ..\ext
+ buildext.pl MAKE=dmake --dir=..\ext
- buildext.pl dmake ..\ext clean
+ buildext.pl MAKE=dmake --dir=..\ext --target=clean
Will skip building extensions which are marked with an '!' char.
Mostly because they still not ported to specified platform.
$incl{$1} = 1;
} elsif (/^--([\w\-]+)$/) {
$opts{$1} = 1;
+ } elsif (/^--([\w\-]+)=(.*)$/) {
+ $opts{$1} = $2;
} else {
push @argv, $_;
}
my $dynamic = $opts{dynamic} || $opts{all};
my $makecmd = shift @argv;
-my $dir = shift @argv;
-my $targ = shift @argv;
+my $dir = $opts{dir} || 'ext';
+my $targ = $opts{target};
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";
+ print "$0: WARNING: Please include MAKE=\$(MAKE)\n";
+ print "\tin your call to buildext.pl. See buildext.pl for details.\n";
exit(1);
}
system(@args) unless defined $::Cross::platform;
}
+print "In ", getcwd();
chdir($dir) || die "Cannot cd to $dir\n";
(my $ext = getcwd()) =~ s{/}{\\}g;
my $code;
FindExt::scan_ext($ext);
-FindExt::set_static_extensions(split ' ', $Config{static_ext}) if $ext ne "ext";
+FindExt::set_static_extensions(split ' ', $Config{static_ext});
my @ext;
push @ext, FindExt::static_ext() if $static;
#-------------------------------------------------------------------------------
Extensions : buildext.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
- $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic
+ $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic
Extensions_reonly : buildext.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
- $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --dynamic +re
+ $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic +re
Extensions_static : buildext.pl list_static_libs.pl $(PERLDEP) $(CONFIGPM)
$(XCOPY) ..\*.h $(COREDIR)\*.*
- $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --static
+ $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --static
$(MINIPERL) -I..\lib list_static_libs.pl > Extensions_static
Extensions_clean :
- -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) --all clean
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean
Extensions_realclean :
- -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" $(EXTDIR) realclean
+ -if exist $(MINIPERL) $(MINIPERL) -I..\lib buildext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --target=realclean
#-------------------------------------------------------------------------------