help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implicit rules


From: Paul Smith
Subject: Re: Implicit rules
Date: Mon, 04 Jun 2007 08:54:15 -0400

On Mon, 2007-06-04 at 11:04 +0000, sharan basappa wrote:

> Does make treat the rule :
> 
> a : a.h  as
> 
> a : a.o a.h
> a.o : a.c
>        $(CC) -c $(CPPFLAGS) $(CFLAGS)

If there are implicit rules:

  %.o : %.c
        $(CC) -c $(CPPFLAGS) $(CFLAGS)
  % : %.o

and there's no explicit rule for building "a" that has a command script
associated with it, then yes.

> Also if I have multiple targets in a rule, do the prereqs specified apply 
> for all the targets
> 
> For example, will the following rule
> 
> a.o b.o : a.c b.c become
> 
> a.o : a.c b.c
> b.o : a.c b.c

Yes (for explicit rules; implicit rules with multiple target patterns
work differently--see the manual).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]