version 1.57, 2008/01/12 13:08:59 |
version 1.58, 2008/11/04 07:22:36 |
|
|
#include "engine.h" |
#include "engine.h" |
#include "lst.h" |
#include "lst.h" |
#include "targ.h" |
#include "targ.h" |
|
#include "targequiv.h" |
#include "garray.h" |
#include "garray.h" |
#include "memory.h" |
#include "memory.h" |
|
|
|
|
printf("update time: %s\n", time_to_string(cgn->mtime)); |
printf("update time: %s\n", time_to_string(cgn->mtime)); |
} |
} |
|
|
|
/* SIB: this is where I should mark the build as finished */ |
|
cgn->build_lock = false; |
for (ln = Lst_First(&cgn->parents); ln != NULL; ln = Lst_Adv(ln)) { |
for (ln = Lst_First(&cgn->parents); ln != NULL; ln = Lst_Adv(ln)) { |
pgn = (GNode *)Lst_Datum(ln); |
pgn = (GNode *)Lst_Datum(ln); |
|
/* SIB: there should be a siblings loop there */ |
pgn->unmade--; |
pgn->unmade--; |
if (pgn->must_make) { |
if (pgn->must_make) { |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
|
|
return false; |
return false; |
} |
} |
|
|
|
/* SIB: this is where there should be a siblings loop */ |
Suff_FindDeps(gn); |
Suff_FindDeps(gn); |
if (gn->unmade != 0) { |
if (gn->unmade != 0) { |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
|
|
return false; |
return false; |
} |
} |
if (Make_OODate(gn)) { |
if (Make_OODate(gn)) { |
|
/* SIB: if a sibling is getting built, I don't build it right now */ |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
printf("out-of-date\n"); |
printf("out-of-date\n"); |
if (queryFlag) |
if (queryFlag) |
return true; |
return true; |
|
/* SIB: this is where commands should get prepared */ |
Make_DoAllVar(gn); |
Make_DoAllVar(gn); |
|
/* SIB: this is where I should make the gn as `being built */ |
|
gn->build_lock = true; |
Job_Make(gn); |
Job_Make(gn); |
} else { |
} else { |
if (DEBUG(MAKE)) |
if (DEBUG(MAKE)) |
|
|
} |
} |
|
|
static void |
static void |
MakeHandleUse(void *pgn, void *cgn) |
MakeHandleUse(void *cgnp, void *pgnp) |
{ |
{ |
Make_HandleUse((GNode *)pgn, (GNode *)cgn); |
GNode *cgn = (GNode *)cgnp; |
|
GNode *pgn = (GNode *)pgnp; |
|
|
|
if (cgn->type & OP_USE) |
|
Make_HandleUse(cgn, pgn); |
} |
} |
|
|
/* Add stuff to the toBeMade queue. we try to sort things so that stuff |
/* Add stuff to the toBeMade queue. we try to sort things so that stuff |
|
|
|
|
|
|
look_harder_for_target(gn); |
look_harder_for_target(gn); |
|
kludge_look_harder_for_target(gn); |
/* |
/* |
* Apply any .USE rules before looking for implicit |
* Apply any .USE rules before looking for implicit |
* dependencies to make sure everything that should have |
* dependencies to make sure everything that should have |