public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51341] New: make cannot detect head file change by dependency file with gcc 4.6.1 on ubuntu 11.10
@ 2011-11-28 22:57 dx_zhou at hotmail dot com
  2011-11-28 23:20 ` [Bug preprocessor/51341] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dx_zhou at hotmail dot com @ 2011-11-28 22:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51341

             Bug #: 51341
           Summary: make cannot detect head file change by dependency file
                    with gcc 4.6.1 on ubuntu 11.10
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dx_zhou@hotmail.com


The issue is that make command cannot detect changes in head file. i.e, if I
touch "test.h", make command will not recompile. 

This works with gcc 4.5.4 on the same OS.

--test.h--
#include <iostream>
void hello()
{
std::cout << "Hello\n";
}

--test.cc--
#include "test.h"
int main()
{
hello();
}

--Makefile--
sources := test.cc    
objects := test.o
depends := test.d
main := test

$(main) : % : %.o 
    g++ $< -o $@

%.o : %.cc
    g++ -c -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" $< -o $@

clean :
    -rm -rf $(objects) $(depends) $(main)

ifneq ($(MAKECMDGOALS),clean)
-include $(depends)
endif


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-09 14:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-28 22:57 [Bug c++/51341] New: make cannot detect head file change by dependency file with gcc 4.6.1 on ubuntu 11.10 dx_zhou at hotmail dot com
2011-11-28 23:20 ` [Bug preprocessor/51341] " pinskia at gcc dot gnu.org
2011-11-28 23:27 ` pinskia at gcc dot gnu.org
2011-11-29 15:39 ` dx_zhou at hotmail dot com
2011-11-29 16:17 ` redi at gcc dot gnu.org
2011-12-09 14:31 ` dx_zhou at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).