summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/MM_Unix.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-05 15:28:17 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-05 15:28:17 +0000
commited4c9df05c168d15d8f1451d9eacda57ad48da88 (patch)
tree98829184b5c158b48c6d9c2a12c7f97eabf67a8e /lib/ExtUtils/MM_Unix.pm
parent814ffeea94204182cbcf139fdf8f39db5d45122e (diff)
downloadperl-ed4c9df05c168d15d8f1451d9eacda57ad48da88.tar.gz
Reinstate #11125, hopefully making MakeMaker to pass
DEFINE and INCLUDE to subdirs (NI-S says he'll work around any problems caused seen Tk if necessary). Also (document and) reorder the PASTHRU_INC and PASTHRU_DEFINE to be _after_ the directory-specific INC and DEFINE as suggested by NI-S (Tk probably being the only "user" of the said macros). p4raw-id: //depot/perl@20501
Diffstat (limited to 'lib/ExtUtils/MM_Unix.pm')
-rw-r--r--lib/ExtUtils/MM_Unix.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index 23701e0eac..a59617dc46 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -127,30 +127,30 @@ sub c_o {
$cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
push @m, '
.c.i:
- '. $cpp_cmd . ' $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
+ '. $cpp_cmd . ' $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.c > $*.i
';
}
push @m, '
.c.s:
- $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+ $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.c
';
push @m, '
.c$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.c
';
push @m, '
.C$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.C
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.C
' if !$Is_OS2 and !$Is_Win32 and !$Is_Dos; #Case-specific
push @m, '
.cpp$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.cpp
.cxx$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.cxx
.cc$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(DEFINE) $(PASTHRU_DEFINE) $*.cc
';
join "", @m;
}
@@ -363,8 +363,10 @@ sub const_cccmd {
my($self,$libperl)=@_;
return $self->{CONST_CCCMD} if $self->{CONST_CCCMD};
return '' unless $self->needs_linking();
+ # PASTHRU_INC is defined explicitly by extensions
+ # wanting to do complex things.
return $self->{CONST_CCCMD} =
- q{CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \\
+ q{CCCMD = $(CC) -c $(INC) $(PASTHRU_INC) \\
$(CCFLAGS) $(OPTIMIZE) \\
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \\
$(XS_DEFINE_VERSION)};
@@ -3108,10 +3110,12 @@ sub pasthru {
my($sep) = $Is_VMS ? ',' : '';
$sep .= "\\\n\t";
- foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE)) {
+ foreach $key (qw(LIB LIBPERL_A LINKTYPE PREFIX OPTIMIZE INC DEFINE)) {
push @pasthru, "$key=\"\$($key)\"";
}
+ # PASTHRU_DEFINE and PASTHRU_INC are defined explicitly
+ # by extensions wanting to do really complex things.
foreach $key (qw(DEFINE INC)) {
push @pasthru, "PASTHRU_$key=\"\$(PASTHRU_$key)\"";
}