develooper Front page | perl.perl5.porters | Postings from January 2001

Re: [patch] MM_Unix cpprun shortcut

Thread Previous | Thread Next
From:
Doug MacEachern
Date:
January 3, 2001 20:06
Subject:
Re: [patch] MM_Unix cpprun shortcut
Message ID:
Pine.LNX.4.10.10101032009330.280-100000@mojo.covalent.net
ok, .i it is..

Index: lib/ExtUtils/MM_Unix.pm
===================================================================
RCS file: /usr/local/cvs_repository/perl-current-mirror/lib/ExtUtils/MM_Unix.pm,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 MM_Unix.pm
--- lib/ExtUtils/MM_Unix.pm	2001/01/04 01:55:51	1.1.1.1
+++ lib/ExtUtils/MM_Unix.pm	2001/01/04 04:06:18
@@ -266,6 +266,14 @@
     my($self) = shift;
     return '' unless $self->needs_linking();
     my(@m);
+    if (my $cpp = $Config{cpprun}) {
+        my $cpp_cmd = $self->const_cccmd;
+        $cpp_cmd =~ s/^CCCMD\s*=\s*\$\(CC\)/$cpp/;
+        push @m, '
+.c.i:
+	'. $cpp_cmd . ' $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c > $*.i
+';
+    }
     push @m, '
 .c$(OBJ_EXT):
 	$(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
@@ -630,7 +638,7 @@
 # work around a famous dec-osf make(1) feature(?):
 makemakerdflt: all
 
-.SUFFIXES: .xs .c .C .cpp .cxx .cc \$(OBJ_EXT)
+.SUFFIXES: .xs .c .C .cpp .i .cxx .cc \$(OBJ_EXT)
 
 # Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that
 # some make implementations will delete the Makefile when we rebuild it. Because


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About