On 4=D4=C224=C8=D5, =CF=C2=CE=E73=CA=B137=B7=D6, Tobias Burnus
<bur...@[EMAIL PROTECTED]
> wrote:
> On Apr 24, 4:28 am, zhaoping...@[EMAIL PROTECTED]
wrote:
>
> > gcc -MM x.cpp can create header file dependent for CPP
> > so I try gfortran -MM x.for ,but I got nothing
> > even when I use gfortran -M x.for ,I got Segmentation fault
>
> Well, at some point "-M directory" was added to specify where the .mod
> file should be written to (by default it is written in the current
> directory). Someone realized then that GCC uses the option to generate
> dependency files and added "-J directory" as replacement for "-M".
> (See gfortran do***entation.) "-M directory" is currently still
> sup****ted but depreciated.
>
> Sup****t for writing the depending information (with -M) is planed for
> the near future (next few months, i.e. 4.4.0) and the first patches
> leading to this have already been posted. Thus the answer is: No,
> currently, gfortran (up to the current developer version) cannot
> generate the dependency information, but in a few months gfortran
> 4.4.0 might sup****t it.
>
> Tobias
>
> PS: This is tracked
inhttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D31588;=
> ignore that there last comment was quite some time ago, it is really
> been worked on. At the moment the task is to better sup****t the C
> preprocessor (cpp), which is needed to fix some feature
> requests/"bugs" but also to sup****t "#include" for the make-file
> dependency generation. See for instance the following, 12 hours old
> patch, which is currently still unreviewed and mentions your -M with
> explicitly as TODO
item:http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01753=
..html
>
> PPS: g95 sup****ts the generation of makefile dependency information;
> you could use g95 as work around until gfortran has implemented it.
thanks for your reply, I have spent 10 minutes to write a small perl
script to do it , although far from perfect ,it's good enough for me ,
then waiting for 4.4 released.:)


|