From: Georg F. <fu...@is...> - 2000-09-15 12:52:27
|
Hello Greg, I think you understand my problem. But I think I was little to short. Until now I have not learned the syntax of the 'sed'. I simply copied some lines from the gnu-make documentation. %.d: %.c $(SHELL) -ec '$(CC) -MM $< | sed '\''s/$*.o/& $@/g'\'' > $@' and was very glad they produced the correct '.d' files. %.d: %.F $(SHELL) -ec '$(CC) -MM $< | sed '\''s/$*.o/& $@/g'\'' > $@' But that rule doesn't work with *.F as input, because the output from g77 is something like "dummy.F.o: dummy.F dummy.inc" and not "dummy.o: dummy.F dummy.inc" So before learning the 'sed'-syntax I was asking, whether some one has already solved the problem. I know and tell it also my students, that is always dangerous to copy some code without understanding it. Thank you for spending your time Greg Chicares wrote: > > 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. > > Maybe I misunderstand; is this what you want? > > C:>sed --version > GNU sed version 3.02 > > C:>sed -e 's/\.F\.o/.o/' > dummy.F.o : dummy.F dummy.inc > dummy.o : dummy.F dummy.inc > > Or did you want to solve the problem without sed? > > BTW, I like this sourceforge list better--thanks Earnie. > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/mailman/listinfo/mingw-users -- 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/ |