diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-02 22:35:04 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-02 22:35:04 +0000 |
commit | d7f54dbfa747b444735e21d0bfc543c0184f5883 (patch) | |
tree | 31ea4daece7d3ca504a618a99c35872efeae2b6a /ext/List | |
parent | 23fb6509afc63cde7930e13c21f5617c860fa149 (diff) | |
download | perl-d7f54dbfa747b444735e21d0bfc543c0184f5883.tar.gz |
Be more explicit on the List::Util build trick,
should also stop unneeded rebuilds on static builds.
p4raw-id: //depot/perl@13432
Diffstat (limited to 'ext/List')
-rw-r--r-- | ext/List/Util/Makefile.PL | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/ext/List/Util/Makefile.PL b/ext/List/Util/Makefile.PL index 93f1d4fc54..eed19f9c5a 100644 --- a/ext/List/Util/Makefile.PL +++ b/ext/List/Util/Makefile.PL @@ -8,6 +8,15 @@ WriteMakefile( package MY; +# We go through the ListUtil.c trickery to foil platforms +# that have the feature combination of +# (1) static builds +# (2) allowing only one object by the same name in the static library +# (3) the object name matching being case-blind +# This means that we can't have the top-level util.o +# and the extension-level Util.o in the same build. +# One such platform is the POSIX-BC BS2000 EBCDIC mainframe platform. + BEGIN { use Config; unless (defined $Config{usedl}) { @@ -16,41 +25,19 @@ sub xs_c { my($self) = shift; return '' unless $self->needs_linking(); ' -.xs.c: - $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > List$*.xsc && $(MV) List$*.xsc List$*.c -'; -} - -sub c_o { - my($self) = shift; - return '' unless $self->needs_linking(); -' -.c$(OBJ_EXT): - $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) List$*.c - $(MV) List$*$(OBJ_EXT) $*$(OBJ_EXT) +ListUtil.c: Util.xs + $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) Util.xs > ListUtil.xsc && $(MV) ListUtil.xsc ListUtil.c '; } -sub xs_o { # many makes are too dumb to use xs_c then c_o +sub xs_o { my($self) = shift; return '' unless $self->needs_linking(); ' -.xs$(OBJ_EXT): - $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > List$*.xsc && $(MV) List$*.xsc List$*.c - $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) List$*.c - $(MV) List$*$(OBJ_EXT) $*$(OBJ_EXT) -'; -} - -sub top_targets { # many makes are too dumb to use xs_c then c_o - my($self) = shift; - my $out = $self->SUPER::top_targets(@_); - $out . -' - -ListUtil.c: Util.c - @$(NOOP) +Util$(OBJ_EXT): ListUtil.c + $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) ListUtil.c + $(MV) ListUtil$(OBJ_EXT) Util$(OBJ_EXT) '; } |