c/9743: -MF only writes the info from the very last of multiple C files.
Tue Feb 18 14:26:00 GMT 2003
>Synopsis: -MF only writes the info from the very last of multiple C files.
>Arrival-Date: Tue Feb 18 14:26:01 UTC 2003
>Originator: Ray Van Tassle
>Release: 3.2.2 & 3.2.1
Reading specs from /users/rayvt/local/gcc322/lib/gcc-lib/sparc-sun-solaris2.6/3.2.2/specs
Configured with: ../configure --prefix=/users/rayvt/local/gcc322
Thread model: posix
gcc version 3.2.2
If you do "gcc -MG -MM -MF deps.mk file1.c file2.c file3.c"
Then only the info for the last file (file3.c) is put in the output file (deps.mk). But if you do ">deps.mk" instead of "-MF", the info for all the files (1 & 2 & c) is there.
It looks like maybe the file named by "-MF" is re-opened for write for each of the processed source files, and is therefore overwritten by each one.
> gcc -MG -MM -MF deps.mk ../src/ip_inbound.c ../src/ip_mobile_info.c ../src/cfg_layer.c
More information about the Gcc-bugs