On 2010-04-06 12:20Z, Payal wrote:
>
> I have many files like a.tcp, b.tcp ... To compile each one I have
> individual rules like,
>
> a.cdb : a.tcp
> tcprules $@ a.tcp.tmp < $^
> b.cdb : b.tcp
> tcprules $@ b.tcp.tmp < $^
> ......
>
> My question is how to write one general rule, so that if any of .tcp
> file change, the respective cdb file should be rebuild.
Add a target that depends on everything that needs to be kept current,
and use a pattern rule to indicate how to build whatever isn't current:
# What to build (if outdated).
.PHONY: all
all: a.tcp b.tcp
# How to build it (if necessary).
%.cdb : %.tcp
tcprules $@ $*.tcp.tmp < $^
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make