Cool!
Thanks Pedro.

Garst

Pedro Zorzenon Neto wrote:
> 

> Hi Garst,
> 
>   You can put a rule in Makefile that creates a .h file with only one
> line and use the defines. You will have to compile the program
> everytime, but as a workaround it may work well.
> 
>   In the makefile, the code will be something like this:
> 
>   echo -n '#define NOW_YEAR ' > now.h
>   date '+%Y' >> now.h
>   echo -n '#define NOW_MONTH ' >> now.h
>   date '+%m' >> now.h
>   ...
> 
>   Then in the C program you can include "now.h" and use the defines.
> 
>   Good Luck,
>    Pedro

Reply via email to