version 1.96, 2012/09/21 07:55:20 |
version 1.97, 2012/10/02 10:29:31 |
|
|
d->object = d->current; |
d->object = d->current; |
} |
} |
|
|
#ifdef CLEANUP |
|
static void |
|
free_CURDIR_OBJDIR(struct dirs *d) |
|
{ |
|
if (d->object != d->current) |
|
free(d->object); |
|
free(d->current); |
|
} |
|
#endif |
|
|
|
|
|
/* |
/* |
* if the VPATH variable is defined, add its contents to the search path. |
* if the VPATH variable is defined, add its contents to the search path. |
* Uses the same format as the PATH env variable, i.e., |
* Uses the same format as the PATH env variable, i.e., |
|
|
Fatal("make: no system rules (%s).", _PATH_DEFSYSMK); |
Fatal("make: no system rules (%s).", _PATH_DEFSYSMK); |
|
|
read_makefile_list(&sysMkPath, d); |
read_makefile_list(&sysMkPath, d); |
#ifdef CLEANUP |
|
Lst_Destroy(&sysMkPath, (SimpleProc)free); |
|
#endif |
|
} |
} |
|
|
if (!Lst_IsEmpty(makefiles)) { |
if (!Lst_IsEmpty(makefiles)) { |
|
|
MainParseArgs(argc, argv); |
MainParseArgs(argc, argv); |
|
|
/* |
/* |
* Be compatible if user did not specify -j and did not explicitly |
* Be compatible if user did not specify -j |
* turn compatibility on |
|
*/ |
*/ |
if (!compatMake && !forceJobs) |
if (!forceJobs) |
compatMake = true; |
compatMake = true; |
|
|
/* And set up everything for sub-makes */ |
/* And set up everything for sub-makes */ |
|
|
|
|
process_suffixes_after_makefile_is_read(); |
process_suffixes_after_makefile_is_read(); |
|
|
/* Print the initial graph, if the user requested it. */ |
|
if (DEBUG(GRAPH1)) |
|
Targ_PrintGraph(1); |
|
|
|
if (dumpData) { |
if (dumpData) { |
dump_data(); |
dump_data(); |
exit(0); |
exit(0); |
} |
} |
|
|
|
/* Print the initial graph, if the user requested it. */ |
|
if (DEBUG(GRAPH1)) |
|
dump_data(); |
|
|
/* Print the values of any variables requested by the user. */ |
/* Print the values of any variables requested by the user. */ |
if (!Lst_IsEmpty(&varstoprint)) { |
if (!Lst_IsEmpty(&varstoprint)) { |
LstNode ln; |
LstNode ln; |
|
|
} |
} |
} |
} |
|
|
#ifdef CLEANUP |
|
Lst_Destroy(&targs, NOFREE); |
|
Lst_Destroy(&varstoprint, NOFREE); |
|
Lst_Destroy(&makefiles, NOFREE); |
|
Lst_Destroy(create, (SimpleProc)free); |
|
#endif |
|
|
|
/* print the graph now it's been processed if the user requested it */ |
/* print the graph now it's been processed if the user requested it */ |
if (DEBUG(GRAPH2)) |
if (DEBUG(GRAPH2)) |
Targ_PrintGraph(2); |
post_mortem(); |
|
|
#ifdef CLEANUP |
|
free_CURDIR_OBJDIR(&d); |
|
End(); |
|
#endif |
|
if (queryFlag && outOfDate) |
if (queryFlag && outOfDate) |
return 1; |
return 1; |
else |
else |