make-alpha
[Top][All Lists]
Advanced

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

Re: Changes for 2nd expansion


From: Boris Kolpackov
Subject: Re: Changes for 2nd expansion
Date: Wed, 20 Aug 2008 19:52:47 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Paul,

Paul D. Smith <address@hidden> writes:
 
> I know this is asking for you to remember way back, but if you have any
> thoughts/caveats/things to look for/special hidden gotchas that you can
> think of, please let me know.

There were a couple of tricky moments and I remember I tried to document
all of them in comments so reading that should help. I just checked
implicit.c in the 3.81 code base and here are a few of those:

implicit.c:494

/* In an ideal world we would take the dependency line,
   substitute the stem, re-expand the whole line and chop it
   into individual prerequisites. Unfortunately this won't work
   because of the "check_lastslash" twist.  Instead, we will
   have to go word by word, taking $()'s into account, for each
   word we will substitute the stem, re-expand, chop it up, and,
   if check_lastslash != 0, add the directory part to each
   resulting prerequisite.  */


implicit.c:520

/* If the dependency name has %, substitute the stem.

   Watch out, we are going to do something tricky
   here. If we just replace % with the stem value,
   later, when we do the second expansion, we will
   re-expand this stem value once again. This is not
   good especially if you have certain characters in
   your stem (like $).

   Instead, we will replace % with $* and allow the
   second expansion to take care of it for us. This way
   (since $* is a simple variable) there won't be
   additional re-expansion of the stem.  */

implicit.c:553

/* Set file variables. Note that we cannot do it once
   at the beginning of the function because of the stem
   value.  */

Also ping me when you are done with the changes and I will give it
a try on my build system which uses the second expansion (including
in patterns) a lot.

Boris




reply via email to

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