On Monday 13 February 2006 00:55, Nick Patavalis wrote: > On Sun, Feb 12, 2006 at 09:23:43PM +0100, Martin Willers wrote: > > program: $(OBJECTS) > > echo "const char build_time[] = \"`date`\";" > build.c > > $(CC) -c build.c > > $(CC) -o $@ $(OBJECTS) build.o > > > > However, with this approach, I have to use an explicit > > compiler call to compile build.c - it would be nicer if I could > > let a pattern rule force compilation of build.c. > > > > Is there a better way to do this? > > Wouldn't this do? > > build.c : $(OBJECTS) > echo "const char build_time[] = \"`date`\";" > build.c > > > program: $(OBJECTS) build.o > $(CC) -o $@ $(OBJECTS) build.o
It does! - Hm, strange, I always got complains about circular dependencies when I tried something like this... :-\ Thanks a lot! -- Martin _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
