version 1.164, 2009/01/23 21:26:30 |
version 1.165, 2009/01/23 21:58:27 |
Line 177 static Boolean jobsRunning; /* TRUE if |
|
Line 177 static Boolean jobsRunning; /* TRUE if |
|
static const char * tracefile; |
static const char * tracefile; |
static char * Check_Cwd_av(int, char **, int); |
static char * Check_Cwd_av(int, char **, int); |
static void MainParseArgs(int, char **); |
static void MainParseArgs(int, char **); |
static int ReadMakefile(void *, void *); |
static int ReadMakefile(const void *, const void *); |
static void usage(void); |
static void usage(void); |
|
|
static char curdir[MAXPATHLEN + 1]; /* startup directory */ |
static char curdir[MAXPATHLEN + 1]; /* startup directory */ |
Line 661 Main_SetObjdir(const char *path) |
|
Line 661 Main_SetObjdir(const char *path) |
|
* TRUE if ok, FALSE on error |
* TRUE if ok, FALSE on error |
*/ |
*/ |
static int |
static int |
ReadAllMakefiles(void *p, void *q) |
ReadAllMakefiles(const void *p, const void *q) |
{ |
{ |
return (ReadMakefile(p, q) == 0); |
return (ReadMakefile(p, q) == 0); |
} |
} |
Line 1006 main(int argc, char **argv) |
|
Line 1006 main(int argc, char **argv) |
|
if (ln != NULL) |
if (ln != NULL) |
Fatal("%s: cannot open %s.", progname, |
Fatal("%s: cannot open %s.", progname, |
(char *)Lst_Datum(ln)); |
(char *)Lst_Datum(ln)); |
} else if (ReadMakefile(UNCONST("makefile"), NULL) != 0) |
} else if (ReadMakefile("makefile", NULL) != 0) |
(void)ReadMakefile(UNCONST("Makefile"), NULL); |
(void)ReadMakefile("Makefile", NULL); |
|
|
/* In particular suppress .depend for '-r -V .OBJDIR -f /dev/null' */ |
/* In particular suppress .depend for '-r -V .OBJDIR -f /dev/null' */ |
if (!noBuiltins || !printVars) { |
if (!noBuiltins || !printVars) { |
doing_depend = TRUE; |
doing_depend = TRUE; |
(void)ReadMakefile(UNCONST(".depend"), NULL); |
(void)ReadMakefile(".depend", NULL); |
doing_depend = FALSE; |
doing_depend = FALSE; |
} |
} |
|
|
Line 1168 main(int argc, char **argv) |
|
Line 1168 main(int argc, char **argv) |
|
* lots |
* lots |
*/ |
*/ |
static int |
static int |
ReadMakefile(void *p, void *q __unused) |
ReadMakefile(const void *p, const void *q __unused) |
{ |
{ |
char *fname = p; /* makefile to read */ |
const char *fname = p; /* makefile to read */ |
int fd; |
int fd; |
size_t len = MAXPATHLEN; |
size_t len = MAXPATHLEN; |
char *name, *path = bmake_malloc(len); |
char *name, *path = bmake_malloc(len); |