This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/51341] make cannot detect head file change by dependency file with gcc 4.6.1 on ubuntu 11.10
- From: "dx_zhou at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Dec 2011 14:06:22 +0000
- Subject: [Bug preprocessor/51341] make cannot detect head file change by dependency file with gcc 4.6.1 on ubuntu 11.10
- Auto-submitted: auto-generated
- References: <bug-51341-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51341
--- Comment #5 from davidz <dx_zhou at hotmail dot com> 2011-12-09 14:06:22 UTC ---
This did solve the issue. Thanks a lot for the explain and syntax!
(In reply to comment #4)
> (In reply to comment #3)
> > I am a little confused. -MT will create .d file. Then make command will include
> > .d and re-compile if dependency file changes. The issue is that g++ 4.6.1
> > doesn't re-compile if I touch .h. Does this mean my test.d format is wrong? If
>
> Did you read the linked bug report? Did you look at the content of test.d?
>
> > I need another -MT, what syntax it should be? Thanks a lot!
>
> g++ -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" "-MT$@" $< -o $@