version 1.63, 2007/09/16 10:14:26 |
version 1.64, 2007/09/16 12:30:35 |
|
|
* |
* |
* Side Effects: |
* Side Effects: |
* The searchPath field of all the suffixes is extended by the |
* The searchPath field of all the suffixes is extended by the |
* directories in dirSearchPath. If paths were specified for the |
* directories in defaultPath. If paths were specified for the |
* ".h" suffix, the directories are stuffed into a global variable |
* ".h" suffix, the directories are stuffed into a global variable |
* called ".INCLUDES" with each directory preceded by a -I. The same |
* called ".INCLUDES" with each directory preceded by a -I. The same |
* is done for the ".a" suffix, except the variable is called |
* is done for the ".a" suffix, except the variable is called |
|
|
if (s->flags & SUFF_LIBRARY) { |
if (s->flags & SUFF_LIBRARY) { |
Dir_Concat(&inLibs, &s->searchPath); |
Dir_Concat(&inLibs, &s->searchPath); |
} |
} |
Dir_Concat(&s->searchPath, dirSearchPath); |
Dir_Concat(&s->searchPath, defaultPath); |
} else |
} else |
Lst_Clone(&s->searchPath, dirSearchPath, Dir_CopyDir); |
Lst_Clone(&s->searchPath, defaultPath, Dir_CopyDir); |
} |
} |
|
|
Var_Set(".INCLUDES", ptr = Dir_MakeFlags("-I", &inIncludes)); |
Var_Set(".INCLUDES", ptr = Dir_MakeFlags("-I", &inIncludes)); |
|
|
path = &s->searchPath; |
path = &s->searchPath; |
} else |
} else |
/* Use default search path. */ |
/* Use default search path. */ |
path = dirSearchPath; |
path = defaultPath; |
|
|
/* Expand the word along the chosen path. */ |
/* Expand the word along the chosen path. */ |
Lst_Init(&exp); |
Lst_Init(&exp); |
|
|
(Lst_IsEmpty(&gn->children) && Lst_IsEmpty(&gn->commands))) |
(Lst_IsEmpty(&gn->children) && Lst_IsEmpty(&gn->commands))) |
{ |
{ |
gn->path = Dir_FindFile(gn->name, |
gn->path = Dir_FindFile(gn->name, |
(targ == NULL ? dirSearchPath : |
(targ == NULL ? defaultPath : |
&targ->suff->searchPath)); |
&targ->suff->searchPath)); |
if (gn->path != NULL) { |
if (gn->path != NULL) { |
char *ptr; |
char *ptr; |
|
|
suffNull->name = estrdup(""); |
suffNull->name = estrdup(""); |
suffNull->nameLen = 0; |
suffNull->nameLen = 0; |
Lst_Init(&suffNull->searchPath); |
Lst_Init(&suffNull->searchPath); |
Dir_Concat(&suffNull->searchPath, dirSearchPath); |
Dir_Concat(&suffNull->searchPath, defaultPath); |
Lst_Init(&suffNull->children); |
Lst_Init(&suffNull->children); |
Lst_Init(&suffNull->parents); |
Lst_Init(&suffNull->parents); |
Lst_Init(&suffNull->ref); |
Lst_Init(&suffNull->ref); |