/[make]/make/implicit.c
ViewVC logotype

Diff of /make/implicit.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.48 by bosk, Tue May 31 20:54:30 2005 UTC revision 1.49 by psmith, Mon Oct 24 13:01:39 2005 UTC
# Line 477  pattern_search (struct file *file, int a Line 477  pattern_search (struct file *file, int a
477    
478            /* Try each dependency; see if it "exists".  */            /* Try each dependency; see if it "exists".  */
479    
           /* @@ There is always only one dep line for any given implicit  
                 rule. So the loop is not necessary. Can rule->deps be 0?  
   
                 Watch out for conversion of suffix rules to implicit rules.  
           */  
   
480            for (dep = rule->deps; dep != 0; dep = dep->next)            for (dep = rule->deps; dep != 0; dep = dep->next)
481              {              {
482                unsigned int len;                unsigned int len;
# Line 513  pattern_search (struct file *file, int a Line 507  pattern_search (struct file *file, int a
507                       we just replace % with the stem value, later, when we do                       we just replace % with the stem value, later, when we do
508                       the second expansion, we will re-expand this stem value                       the second expansion, we will re-expand this stem value
509                       once again. This is not good especially if you have                       once again. This is not good especially if you have
510                       certain characters in your setm (like $).                       certain characters in your stem (like $).
511    
512                       Instead, we will replace % with $* and allow the second                       Instead, we will replace % with $* and allow the second
513                       expansion to take care of it for us. This way (since $*                       expansion to take care of it for us. This way (since $*
# Line 836  pattern_search (struct file *file, int a Line 830  pattern_search (struct file *file, int a
830    
831        dep = (struct dep *) xmalloc (sizeof (struct dep));        dep = (struct dep *) xmalloc (sizeof (struct dep));
832        dep->ignore_mtime = d->ignore_mtime;        dep->ignore_mtime = d->ignore_mtime;
833          dep->staticpattern = 0;
834        dep->need_2nd_expansion = 0;        dep->need_2nd_expansion = 0;
835        s = d->name; /* Hijacking the name. */        s = d->name; /* Hijacking the name. */
836        d->name = 0;        d->name = 0;
# Line 917  pattern_search (struct file *file, int a Line 912  pattern_search (struct file *file, int a
912            struct dep *new = (struct dep *) xmalloc (sizeof (struct dep));            struct dep *new = (struct dep *) xmalloc (sizeof (struct dep));
913            /* GKM FIMXE: handle '|' here too */            /* GKM FIMXE: handle '|' here too */
914            new->ignore_mtime = 0;            new->ignore_mtime = 0;
915              new->staticpattern = 0;
916            new->need_2nd_expansion = 0;            new->need_2nd_expansion = 0;
917            new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1);            new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1);
918            bcopy (rule->targets[i], p,            bcopy (rule->targets[i], p,
# Line 928  pattern_search (struct file *file, int a Line 924  pattern_search (struct file *file, int a
924                   rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1);                   rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1);
925            new->file = enter_file (new->name);            new->file = enter_file (new->name);
926            new->next = file->also_make;            new->next = file->also_make;
927              
928            /* Set precious flag. */            /* Set precious flag. */
929            f = lookup_file (rule->targets[i]);            f = lookup_file (rule->targets[i]);
930            if (f && f->precious)            if (f && f->precious)
931              new->file->precious = 1;              new->file->precious = 1;
932              
933            file->also_make = new;            file->also_make = new;
934          }          }
935    

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26