From: Doug MacEachern Date: Wed, 3 Jan 2001 20:09:57 +0000 (-0800) Subject: Re: [patch] MM_Unix cpprun shortcut X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b207e5e2c40219749f3bdcc1346a77b6985ff4c7;p=p5sagit%2Fp5-mst-13.2.git Re: [patch] MM_Unix cpprun shortcut Message-ID: Add a .c.i: MakeMaker make rule to create cpreprocessed outputs. p4raw-id: //depot/perl@8307 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 50f10d8..8624f11 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -266,6 +266,14 @@ sub c_o { 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 @@ MAN3PODS = ".join(" \\\n\t", sort keys %{$self->{MAN3PODS}})." # 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