On Sun, Jun 08, 2008 at 08:26:41AM -0700, VitalyP wrote:
> 
> I am doing simple codegen with makefile. File gen.c is generated from
> gensrc.c. The example below works correctly and gen.c is generated
> when gensrc.c has more recent timestamp
> 
> test: gen.c
>     gcc -o $@ $<
> 
> gen.c: gensrc.c
>     # here goes some codegen command
> 
> 
> However in the example below gen.c is generated even if gensrc.c is
> older than gen.c. That is target 'prebuild' is always considered as
> not up-to date. Why is it so?
> 
> .PHONY: prebuild

PHONY targets are per definition always out-of-date.
See make info for more info on PHONY

        Sam


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to