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

Diff of /make/read.c

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

revision 1.143 by psmith, Wed Apr 13 03:16:33 2005 UTC revision 1.144 by psmith, Tue May 3 13:57:20 2005 UTC
# Line 1215  eval (struct ebuffer *ebuf, int set_defa Line 1215  eval (struct ebuffer *ebuf, int set_defa
1215    
1216             foo:             foo:
1217    
1218             ifeq ($(.DEFAULT_TARGET),foo)             ifeq ($(.DEFAULT_GOAL),foo)
1219                ...                ...
1220             endif             endif
1221    
1222             Because the target is not recorded until after ifeq directive is             Because the target is not recorded until after ifeq directive is
1223             evaluated the .DEFAULT_TARGET does not contain foo yet as one             evaluated the .DEFAULT_GOAL does not contain foo yet as one
1224             would expect. Because of this we have to move some of the logic             would expect. Because of this we have to move some of the logic
1225             here.  */             here.  */
1226    
1227          if (**default_target_name == '\0' && set_default)          if (**default_goal_name == '\0' && set_default)
1228            {            {
1229              char* name;              char* name;
1230              struct dep *d;              struct dep *d;
# Line 1277  eval (struct ebuffer *ebuf, int set_defa Line 1277  eval (struct ebuffer *ebuf, int set_defa
1277    
1278                  if (!reject)                  if (!reject)
1279                    {                    {
1280                      (void) define_variable_global (                      define_variable_global (".DEFAULT_GOAL", 13, t->name,
1281                        ".DEFAULT_TARGET", 15, t->name, o_file, 0, NILF);                                              o_file, 0, NILF);
1282                      break;                      break;
1283                    }                    }
1284                }                }
# Line 2095  record_files (struct nameseq *filenames, Line 2095  record_files (struct nameseq *filenames,
2095            name = f->name;            name = f->name;
2096          }          }
2097    
2098        /* See if this target is a default target and update        /* If this target is a default target, update DEFAULT_GOAL_FILE.  */
2099           DEFAULT_GOAL_FILE if necessary.  */        if (strcmp (*default_goal_name, name) == 0
2100        if (strcmp (*default_target_name, name) == 0 &&            && (default_goal_file == 0
2101            (default_goal_file == 0 ||                || strcmp (default_goal_file->name, name) != 0))
2102             strcmp (default_goal_file->name, name) != 0))          default_goal_file = f;
         {  
           default_goal_file = f;  
         }  
2103      }      }
2104    
2105    if (implicit)    if (implicit)

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.144

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