title: GNU-Make does not recompile when a header file changed
body: <p>GNU-Make does not recompile when hdr.h file changed.
  As below printed lines, it did not try to recompile even main.d file is generated.
  Can you guide me why it happend?</p>
  
  <p>hdr.h</p>
  
  <pre><code>#ifndef __HDR_H__  
  
  #define LOOP_CNT 1000  
  
  #endif /* __HDR_H__ */  
  </code></pre>
  
  <p>main.c</p>
  
  <pre><code>#include &lt;stdio.h&gt;  
  #include "hdr.h"  
  
  int main(void)  
  {  
      int i, sum = 0;  
      for (i = 0; i &lt; LOOP_CNT; i++) sum += i;  
      (void)printf("sum = %d\n", sum);  
      return 0;  
  }  
  </code></pre>
  
  <p>Makefile</p>
  
  <pre><code>SUFFIXES += .d
  
  .PHONY: clean  
  
  OBJECTS = $(patsubst %.c,%.o,$(wildcard *.c))  
  CC = armcc  
  LD = armcc  
  CFLAGS += 
  
  # Default target  
  all: sum  
  
  sum : $(OBJECTS)  
      $(CC) $(CFLAGS) -o $@ $^  
  
  $(OBJECTS) : %.o : %.c   
      $(CC) $(CFLAGS) -o $@ -c $&lt;  
  
  # Generating dependency files  
  %.d : %.c  
      @$(CC) -M $&lt; &gt; $@  
  
  # Include dependency file to have gcc recompile necessary sources  
  include $(patsubst %.c,%.d,$(wildcard *.c))  
  #$(info $(patsubst %.c,%.d,$(wildcard *.c)))
  
  clean:  
      rm -f *.o *.d core $(EXEC_NAME)  
  </code></pre>
  
  <p>Here is printed line in second.</p>
  
  <pre><code>C:\project\dep&gt;make all
  Makefile:24: main.d: No such file or directory
  armcc    -o main.o -c main.c
  armcc    -o sum main.o
  
  C:\project\dep&gt;make all
  make: Nothing to be done for `all'. 
  </code></pre>
  
  <p>main.d file is generated as below.</p>
  
  <pre><code>__image.axf: main.c
  __image.axf: C:\Program Files\ARM\RVCT\Data\4.1\713\include\windows\stdio.h
  __image.axf: hdr.h
  </code></pre>