Thanks a lot Philip ..
From: "Philip Guenther" <[EMAIL PROTECTED]>
To: "sharan basappa" <[EMAIL PROTECTED]>
CC: [email protected]
Subject: Re: multiple targets in a rule
Date: Mon, 25 Jun 2007 10:02:04 -0600
On 6/25/07, sharan basappa <[EMAIL PROTECTED]> wrote:
This looks very simple .. somehow I cant figure it out ..
...
I have a simple make with one rule that says :
a.o b.o : a.c
When I execute this make all I get is
Updating goal targets....
Considering target file `a.o'.
...
Successfully remade target file `a.o'.
Is there a reason why target b.o is considered by make ?
a.o and b.o are distinct targets. The fact that you've specified a
common dependency for them using a single line does not change that.
The make info pages say this about how make selects the default goal:
By default, `make' starts with the first target (not targets whose
names start with `.'). This is called the "default goal".
The first target in your makefile is "a.o". Therefore, if you don't
otherwise specify a goal, simply running "make" will only build a.o
and its dependencies. If you want a.o and b.o to both be built by
default, the traditional technique is to do so by putting the 'all'
target first and making them both dependencies of that target:
all: a.o b.o
a.o b.o: a.c
Philip Guenther
_________________________________________________________________
Wedding bells are ringing. When's your time to walk the aisle?
http://ad.in.doubleclick.net/clk;112111293;17571293;v?http://www.simplymarry.com/timesmatri/faces/jsp/UserTrackLandingPage.jsp?origin=hotmail_taglines_ros_june07
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make