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; |
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 |
} |
} |
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) |