bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnu-utils] Re: Fortran progs and the -M-Option for the preprocessor


From: Georg Fusz
Subject: [Bug-gnu-utils] Re: Fortran progs and the -M-Option for the preprocessor.
Date: Fri, 15 Sep 2000 17:31:20 +0000

To solve the problem I have changed the rule, which works for C-Files
%.d: %.c
        $(SHELL) -ec '$(CC) -MM $< | sed '\''s/$*.o/& $@/g'\'' > $@'

 
for fortran-files to

%.d: %.F
        $(SHELL) -ec '$(FC) -MM $< | sed '\''s/$*.F.o/$*.o $@/g'\'' > $@'
                                                 ^^

Can some explain for what the marked characters are good?

sed '\''s/$*.F.o/$*.o $@/g'\'' > $@
    ^^^                    ^^^


Georg Fusz wrote:
> 
> I am using the g77 and gcc implementation from MingGw (2.95.2-1)
> under Windows NT.
> 
> Wenn I run the preprocessor about a Fortran file to create a *.d File to 
> include
> in my Makefile I get a not correct result.
> 
> g77 -MM dummy.F
> 
> gives
> 
> dummy.F.o : dummy.F dummy.inc
> 
> Of course I can kill the ".F" in dummy.F.o with the 'sed'.
> 
> But maybe someone has allready a script written down.
> 
> --
> Georg Fusz
> Technische Universitaet Berlin, Germany
> 
> Fon:
> Uni.: +49 30 314 26 884
> privat: +49 30 815 30 32
> Handy: +49 173 20 10 696
> 
> Homepage: http://www.cadlab.tu-berlin.de/~fusz/

-- 
Georg Fusz
Technische Universitaet Berlin, Germany


Fon:
Uni.: +49 30 314 26 884
privat: +49 30 815 30 32
Handy: +49 173 20 10 696

Homepage: http://www.cadlab.tu-berlin.de/~fusz/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]