title: How to generate .h header file using makefile and use it in same makefile for compilation of source?
body: <p>I want to generate a header file abc.h using makefile.
  And, include this header file in abc.cpp file, which has to be built from same makefile.</p>
  
  <p>I am facing issue that it is not generating .h file before compiling .cpp file. So, i am getting an fatal error for header file not found.</p>
  
  <p>e.g:</p>
  
  <hr>
  
  <pre><code>//abc.h
  #define VAR "My Name"
  </code></pre>
  
  <hr>
  
  <pre><code>//abc.cpp
  #include "abc.h"
  </code></pre>
  
  <hr>
  
  <p>So, question is how to write makefile where it generates header file before compiling source file so that i don't get header file inclusion error?</p>
  
  <p>I have created makefile like below but it's not generating file before any other compilation:</p>
  
  <hr>
  
  <pre><code>-include dummy
  
  noinst_LTLIBRARIES = window.la
  
  .PHONY: dummy
  
  dummy:
      @echo "#define VAR "MYNAME" &gt; abc.h
  
  window_la_SOURCES = \
      ../src/abc.cpp 
  
  window_la_CPPFLAGS = \
      -I $(srcdir)/../src/
  </code></pre>
  
  <hr>
  
  <p>I want to generate abc.h in above makefile before my compilation begins for abc.cpp. So, that i don't get fatal error for header inclusion. Please suggest.</p>