diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-01-31 20:16:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-01-31 20:16:43 +0000 |
commit | 07f3cc2a611daebb9d83f869d36ef63cf4fa2565 (patch) | |
tree | f86a1dd6458958491c2c86ad4ad6119e77f48946 /make_ext.pl | |
parent | fc6784129696c3d1b807ce356dbd42133b41d86a (diff) | |
download | perl-07f3cc2a611daebb9d83f869d36ef63cf4fa2565.tar.gz |
Move the static/dynamic/nonxs LINKTYPE logic from make_ext.pl to Makefile.SH
This simplifies make_ext.pl considerably. Given that the first use of 'passthru'
was in 40000a8c37c35cc00114329ca0add46bca36a0ec in 1995, possibly we should have
done this particular refactoring a little while ago.
Diffstat (limited to 'make_ext.pl')
-rw-r--r-- | make_ext.pl | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/make_ext.pl b/make_ext.pl index e802f653fb..2f09453f14 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -38,6 +38,7 @@ my $makecmd = shift @pass_through; # Should be something like MAKE=make unshift @pass_through, 'PERL_CORE=1'; my $target = $opts{target}; +$target = 'all' unless defined $target; my $extspec = $extspec[0]; # Previously, $make was taken from config.sh. However, the user might @@ -67,31 +68,11 @@ if (!defined($extspec) or $extspec eq '') { exit(1); } -# check link type and do any preliminaries. Valid link types are -# 'dynamic', 'static', and 'static_pic' (the last one respects -# CCCDLFLAGS such as -fPIC -- see static_target in the main Makefile.SH) -if ($target eq 'dynamic') { - unshift @pass_through, 'LINKTYPE=dynamic'; - $target = 'all'; -} -elsif ($target eq 'static') { - unshift @pass_through, 'LINKTYPE=static', 'CCCDLFLAGS='; - $target = 'all'; -} -elsif ($target eq 'static_pic') { - unshift @pass_through, 'LINKTYPE=static'; - $target = 'all'; -} -elsif ($target eq 'nonxs') { - $target = 'all'; -} -elsif ($target =~ /clean$/) { -} -elsif ($target eq '') { - print "make_ext: no make target specified (eg static or dynamic)\n"; +if ($target eq '') { + print "make_ext: no make target specified (eg all or clean)\n"; exit(1); } -else { +elsif ($target !~ /(?:^all|clean)$/) { # for the time being we are strict about what make_ext is used for print "make_ext: unknown make target '$target'\n"; exit(1); |