Re: compiling in the build time

2005-11-03 Thread Warren Young
David Byron wrote: What I'm having trouble with is getting the builddate.c recipe to happen at the right time. Could you make it depend on *.o except for builddate.o? If any of those change, rebuild builddate.c, which will cause builddate.o to be rebuilt.

compiling in the build time

2005-11-03 Thread David Byron
This feels like a faq, but I couldn't find anything related so here goes. I'd like to compile in the build time into my application. I have a recipe like this: BUILDTIME = $(shell TZ=UTC date --utc) builddate.c: echo "#include " >$@ echo >>$@ echo "const char *BuildDate