version 1.88, 2007/11/03 11:44:30 |
version 1.89, 2007/11/17 09:49:53 |
|
|
|
|
static void setup_VPATH(void); |
static void setup_VPATH(void); |
|
|
static void read_all_make_rules(bool, Lst, struct dirs *); |
static void read_all_make_rules(bool, bool, Lst, struct dirs *); |
static void read_makefile_list(Lst, struct dirs *); |
static void read_makefile_list(Lst, struct dirs *); |
static int ReadMakefile(void *, void *); |
static int ReadMakefile(void *, void *); |
|
|
|
|
} |
} |
|
|
static void |
static void |
read_all_make_rules(bool noBuiltins, Lst makefiles, struct dirs *d) |
read_all_make_rules(bool noBuiltins, bool read_depend, |
|
Lst makefiles, struct dirs *d) |
{ |
{ |
/* |
/* |
* Read in the built-in rules first, followed by the specified |
* Read in the built-in rules first, followed by the specified |
|
|
if (!ReadMakefile("makefile", d)) |
if (!ReadMakefile("makefile", d)) |
(void)ReadMakefile("Makefile", d); |
(void)ReadMakefile("Makefile", d); |
|
|
/* Always read a .depend file, if it exists. */ |
/* read a .depend file, if it exists, and we're not building depend */ |
(void)ReadMakefile(".depend", d); |
|
|
if (read_depend) |
|
(void)ReadMakefile(".depend", d); |
} |
} |
|
|
|
|
|
|
const char *syspath = _PATH_DEFSYSPATH; |
const char *syspath = _PATH_DEFSYSPATH; |
char *p; |
char *p; |
static struct dirs d; |
static struct dirs d; |
|
bool read_depend = true;/* false if we don't want to read .depend */ |
|
|
no_fd_limits(); |
no_fd_limits(); |
setup_CURDIR_OBJDIR(&d, machine); |
setup_CURDIR_OBJDIR(&d, machine); |
|
|
for (ln = Lst_First(create); ln != NULL; ln = Lst_Adv(ln)) { |
for (ln = Lst_First(create); ln != NULL; ln = Lst_Adv(ln)) { |
char *name = (char *)Lst_Datum(ln); |
char *name = (char *)Lst_Datum(ln); |
|
|
|
if (strcmp(name, "depend") == 0) |
|
read_depend = false; |
|
|
Var_Append(".TARGETS", name); |
Var_Append(".TARGETS", name); |
} |
} |
} else |
} else |
|
|
if (Lst_IsEmpty(systemIncludePath)) |
if (Lst_IsEmpty(systemIncludePath)) |
add_dirpath(systemIncludePath, syspath); |
add_dirpath(systemIncludePath, syspath); |
|
|
read_all_make_rules(noBuiltins, &makefiles, &d); |
read_all_make_rules(noBuiltins, read_depend, &makefiles, &d); |
|
|
Var_Append("MFLAGS", Var_Value(MAKEFLAGS)); |
Var_Append("MFLAGS", Var_Value(MAKEFLAGS)); |
|
|