help-make
[Top][All Lists]
Advanced

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

Re: How to get the 2nd, 3rd prerequisite, etc?


From: Robert P. J. Day
Subject: Re: How to get the 2nd, 3rd prerequisite, etc?
Date: Wed, 25 Nov 2009 00:22:07 -0500 (EST)
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)

On Tue, 24 Nov 2009, Paul Smith wrote:

> On Tue, 2009-11-24 at 22:09 -0600, Peng Yu wrote:
> > $< gives the first prerequisite. I'm wondering how to get the 2nd,
> > 3rd, ..., prerequisite.
>
> Look up the "word" function in the GNU make manual (combined with $^)

  while, technically, that's a correct answer, it's also worth
suggesting that, if you truly need to distinguish between your
prerequisites that way, there's possibly something wrong with your
design.

  prereqs should, in an ideal world, simply represent a set of
unordered dependencies.  if you're insisting that they have a
particular order and you want to examine that order, i think you're
just asking for trouble.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================




reply via email to

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