/* * Copyright 1993, 1995 Christopher Seiwald. * * This file is part of Jam - see jam.c for Copyright information. */ /* * make.c - bring a target up to date, once rules are in place * * This modules controls the execution of rules to bring a target and * its dependencies up to date. It is invoked after the targets, rules, * et. al. described in rules.h are created by the interpreting of the * jam files. * * This file contains the main make() entry point and the first pass * make0(). The second pass, make1(), which actually does the command * execution, is in make1.c. * * External routines: * make() - make a target, given its name * * Internal routines: * make0() - calculate fates for everything needed to make a TARGET * make0sort() - reorder TARGETS chain by their time (newest to oldest) * make0bscan() - bind and scan everything needed to make a TARGET * * 12/26/93 (seiwald) - allow NOTIME targets to be expanded via $(<), $(>) * 01/04/94 (seiwald) - print all targets, bounded, when tracing commands * 04/08/94 (seiwald) - progress report now reflects only targets with actions * 04/11/94 (seiwald) - Combined deps & headers into deps[2] in TARGET. * 12/20/94 (seiwald) - NOTIME renamed NOTFILE. * 12/20/94 (seiwald) - make0() headers after determining fate of target, so * that headers aren't seen as dependents on themselves. * 01/19/95 (seiwald) - distinguish between CANTFIND/CANTMAKE targets. * 02/02/95 (seiwald) - propagate leaf source time for new LEAVES rule. * 02/14/95 (seiwald) - NOUPDATE rule means don't update existing target. * 08/22/95 (seiwald) - NOUPDATE targets immune to anyhow (-a) flag. * 09/06/00 (seiwald) - NOCARE affects targets with sources/actions. * 03/02/01 (seiwald) - reverse NOCARE change. * 03/14/02 (seiwald) - TEMPORARY targets no longer take on parents age * 03/16/02 (seiwald) - support for -g (reorder builds by source time) * 07/17/02 (seiwald) - TEMPORARY sources for headers now get built * 09/19/02 (seiwald) - new -d displays * 09/23/02 (seiwald) - suppress "...using temp..." in default output * 09/28/02 (seiwald) - make0() takes parent pointer; new -dc display * 11/04/02 (seiwald) - const-ing for string literals * 12/03/02 (seiwald) - fix odd includes support by grafting them onto depends * 12/17/02 (seiwald) - new copysettings() to protect target-specific vars * 01/03/03 (seiwald) - T_FATE_NEWER once again gets set with missing parent */ # include "jam.h" # include "lists.h" # include "parse.h" # include "variable.h" # include "rules.h" # include "search.h" # include "newstr.h" # include "make.h" # include "headers.h" # include "command.h" # ifndef max # define max( a,b ) ((a)>(b)?(a):(b)) # endif typedef struct { int temp; int updating; int cantfind; int cantmake; int targets; int made; } COUNTS ; static void make0( TARGET *t, TARGET *p, int depth, COUNTS *counts, int anyhow ); static TARGETS *make0sort( TARGETS *c ); static void make0bscan( TARGET *t ); static void make0includes( TARGET *t ); static void make0gatherincludes( TARGET *t ); static TARGETS* make0gatherincludes2( const char* tname, TARGETS *chain, TARGET* t ); static long mark_generation = 0; static const char *target_fate[] = { "init", /* T_FATE_INIT */ "making", /* T_FATE_MAKING */ "stable", /* T_FATE_STABLE */ "newer", /* T_FATE_NEWER */ "temp", /* T_FATE_ISTMP */ "touched", /* T_FATE_TOUCHED */ "missing", /* T_FATE_MISSING */ "needtmp", /* T_FATE_NEEDTMP */ "old", /* T_FATE_OUTDATED */ "update", /* T_FATE_UPDATE */ "nofind", /* T_FATE_CANTFIND */ "nomake" /* T_FATE_CANTMAKE */ } ; static const char *target_bind[] = { "unbound", "missing", "parents", "exists", } ; # define spaces(x) ( " " + 16 - ( x > 16 ? 16 : x ) ) /* * make() - make a target, given its name */ int make( int n_targets, const char **targets, int anyhow ) { int i; COUNTS counts[1]; int status = 0; /* 1 if anything fails */ memset( (char *)counts, 0, sizeof( *counts ) ); for( i = 0; i < n_targets; i++ ) { TARGET *t = bindtarget( targets[i] ); make0bscan( t ); } for( i = 0; i < n_targets; i++ ) { TARGET *t = bindtarget( targets[i] ); make0includes( t ); } for( i = 0; i < n_targets; i++ ) { TARGET *t = bindtarget( targets[i] ); make0( t, 0, 0, counts, anyhow ); } if( DEBUG_MAKE ) { if( counts->targets ) printf( "...found %d target(s)...\n", counts->targets ); if( counts->temp ) printf( "...using %d temp target(s)...\n", counts->temp ); if( counts->updating ) printf( "...updating %d target(s)...\n", counts->updating ); if( counts->cantfind ) printf( "...can't find %d target(s)...\n", counts->cantfind ); if( counts->cantmake ) printf( "...can't make %d target(s)...\n", counts->cantmake ); } status = counts->cantfind || counts->cantmake; for( i = 0; i < n_targets; i++ ) status |= make1( bindtarget( targets[i] ) ); return status; } /* * make0() - bind and scan everything to make a TARGET * * Make0() recursively binds a target, searches for #included headers, * calls itself on those headers, and calls itself on any dependents. */ static void make0( TARGET *t, TARGET *p, /* parent */ int depth, /* for display purposes */ COUNTS *counts, /* for reporting */ int anyhow ) /* forcibly touch all (real) targets */ { TARGETS *c, *d, *incs; TARGET *ptime = t; time_t last, leaf, hlast; int fate; const char *flag = ""; SETTINGS *s; /* * Step 1: initialize */ if( DEBUG_MAKEPROG ) printf( "make\t--\t%s%s\n", spaces( depth ), t->name ); t->fate = T_FATE_MAKING; /* * Step 2: under the influence of "on target" variables, * bind the target and search for headers. */ /* If temp file doesn't exist but parent does, use parent */ if( p && t->flags & T_FLAG_TEMP && t->binding == T_BIND_MISSING && p->binding != T_BIND_MISSING ) { t->binding = T_BIND_PARENTS; ptime = p; } /* * Pause for a little progress reporting */ if( DEBUG_MAKEPROG ) { if( strcmp( t->name, t->boundname ) ) { printf( "bind\t--\t%s%s: %s\n", spaces( depth ), t->name, t->boundname ); } switch( t->binding ) { case T_BIND_UNBOUND: case T_BIND_MISSING: case T_BIND_PARENTS: printf( "time\t--\t%s%s: %s\n", spaces( depth ), t->name, target_bind[ t->binding ] ); break; case T_BIND_EXISTS: printf( "time\t--\t%s%s: %s", spaces( depth ), t->name, ctime( &t->time ) ); break; } } /* * Step 3: recursively make0() dependents & headers */ /* Step 3a: recursively make0() dependents */ /* Warn about circular deps. */ for( c = t->depends; c; c = c->next ) { if( DEBUG_DEPENDS ) printf( "Depends \"%s\" : \"%s\" ;\n", t->name, c->target->name ); if( c->target->fate == T_FATE_MAKING ) printf( "warning: %s depends on itself\n", c->target->name ); else if( c->target->fate == T_FATE_INIT ) make0( c->target, ptime, depth + 1, counts, anyhow ); } /* Step 3b: recursively make0() headers */ /* Ignore circular deps: headers include themselves a lot. */ for( c = t->includes; c; c = c->next ) { if( DEBUG_DEPENDS ) printf( "Includes \"%s\" : \"%s\" ;\n", t->name, c->target->name ); if( c->target->fate == T_FATE_INIT ) make0( c->target, p, depth + 1, counts, anyhow ); } /* Step 3c: add dependents' includes to our direct dependencies */ incs = 0; t->mark = ++mark_generation; for( c = t->depends; c; c = c->next ) c->target->mark = mark_generation; for( c = t->depends; c; c = c->next ) for( d = c->target->includes; d; d = d->next ) { TARGET *temp = bindtarget( d->target->name ); if ( temp->mark != mark_generation ) { if( DEBUG_DEPENDS ) printf( "# (implicit) Depends \"%s\" : \"%s\" ;\n", t->name, d->target->name ); temp->mark = mark_generation; incs = targetentry( incs, temp ); } } t->depends = targetchain( t->depends, incs ); /* * Step 4: compute time & fate */ /* Step 4a: pick up dependents' time and fate */ last = 0; leaf = 0; fate = T_FATE_STABLE; for( c = t->depends; c; c = c->next ) { /* If LEAVES has been applied, we only heed the timestamps of */ /* the leaf source nodes. */ leaf = max( leaf, c->target->leaf ); if( t->flags & T_FLAG_LEAVES ) { last = leaf; continue; } last = max( last, c->target->time ); fate = max( fate, c->target->fate ); } /* Step 4b: pick up included headers time */ /* * If a header is newer than a temp source that includes it, * the temp source will need building. Only bother for temp * sources. */ hlast = 0; if( t->binding == T_BIND_PARENTS ) for( c = t->includes; c; c = c->next ) hlast = max( hlast, c->target->time ); /* Step 4c: handle NOUPDATE oddity */ /* * If a NOUPDATE file exists, make dependents eternally old. * Don't inherit our fate from our dependents. Decide fate * based only upon other flags and our binding (done later). */ if( t->flags & T_FLAG_NOUPDATE ) { last = 0; t->time = 0; fate = T_FATE_STABLE; } /* Step 4d: determine fate: rebuild target or what? */ /* In English: If can't find or make child, can't make target. If children changed, make target. If target missing, make it. If children newer, make target. If temp's children newer than parent, make temp. If temp's headers newer than parent, make temp. If deliberately touched, make it. If up-to-date temp file present, use it. If target newer than non-notfile parent, mark target newer. Otherwise, stable! Note this block runs from least to most stable: as we make it further down the list, the target's fate is getting stabler. */ if( fate >= T_FATE_BROKEN ) { fate = T_FATE_CANTMAKE; } else if( fate >= T_FATE_SPOIL ) { fate = T_FATE_UPDATE; } else if( t->binding == T_BIND_MISSING ) { fate = T_FATE_MISSING; } else if( t->binding == T_BIND_EXISTS && last > t->time ) { fate = T_FATE_OUTDATED; } else if( t->binding == T_BIND_PARENTS && last > p->time ) { fate = T_FATE_NEEDTMP; } else if( t->binding == T_BIND_PARENTS && hlast > p->time ) { fate = T_FATE_NEEDTMP; } else if( t->flags & T_FLAG_TOUCHED ) { fate = T_FATE_TOUCHED; } else if( anyhow && !( t->flags & T_FLAG_NOUPDATE ) ) { fate = T_FATE_TOUCHED; } else if( t->binding == T_BIND_EXISTS && t->flags & T_FLAG_TEMP ) { fate = T_FATE_ISTMP; } else if( t->binding == T_BIND_EXISTS && p && p->binding != T_BIND_UNBOUND && t->time > p->time ) { fate = T_FATE_NEWER; } else { fate = T_FATE_STABLE; } /* Step 4e: handle missing files */ /* If it's missing and there are no actions to create it, boom. */ /* If we can't make a target we don't care about, 'sokay */ /* We could insist that there are updating actions for all missing */ /* files, but if they have dependents we just pretend it's NOTFILE. */ if( fate == T_FATE_MISSING && !t->actions && !t->depends ) { if( t->flags & T_FLAG_NOCARE ) { fate = T_FATE_STABLE; } else { printf( "don't know how to make %s\n", t->name ); fate = T_FATE_CANTFIND; } } /* Step 4f: propagate dependents' time & fate. */ /* Set leaf time to be our time only if this is a leaf. */ t->time = max( t->time, last ); t->leaf = leaf ? leaf : t->time ; t->fate = fate; /* * Step 5: sort dependents by their update time. */ if( globs.newestfirst ) t->depends = make0sort( t->depends ); /* * Step 6: a little harmless tabulating for tracing purposes */ if( !( ++counts->targets % 1000 ) && DEBUG_MAKE ) printf( "...patience...\n" ); if( fate == T_FATE_ISTMP ) counts->temp++; else if( fate == T_FATE_CANTFIND ) counts->cantfind++; else if( fate == T_FATE_CANTMAKE && t->actions ) counts->cantmake++; else if( fate >= T_FATE_BUILD && fate < T_FATE_BROKEN && t->actions ) counts->updating++; if( !( t->flags & T_FLAG_NOTFILE ) && fate >= T_FATE_SPOIL ) flag = "+"; else if( t->binding == T_BIND_EXISTS && p && t->time > p->time ) flag = "*"; if( DEBUG_MAKEPROG ) printf( "made%s\t%s\t%s%s\n", flag, target_fate[ t->fate ], spaces( depth ), t->name ); if( DEBUG_CAUSES && t->fate >= T_FATE_NEWER && t->fate <= T_FATE_MISSING ) printf( "%s %s\n", target_fate[ t->fate ], t->name ); } /* * make0bscan() - bind and scan everything to make a TARGET * * make0bscan() recursively binds a target, searches for #included * headers, calls itself on those headers, and calls itself on any * dependents. */ static void make0bscan( TARGET *t ) { TARGETS *c; SETTINGS *s; /* * Step 1: initialize */ if ( t->makeflags & T_MAKEFLAG_SCANNED ) return; t->makeflags |= T_MAKEFLAG_SCANNED; /* * Step 2: under the influence of "on target" variables, * bind the target and search for headers. */ /* Step 2a: set "on target" variables. */ s = copysettings( t->settings ); pushsettings( s ); /* Step 2b: find the target file (if it's a file). */ if( t->binding == T_BIND_UNBOUND && !( t->flags & T_FLAG_NOTFILE ) ) { t->boundname = search( t->name, &t->time ); t->binding = t->time ? T_BIND_EXISTS : T_BIND_MISSING; } /* Step 2c: If its a file, search for headers. */ if( t->binding == T_BIND_EXISTS ) headers( t ); /* Step 2d: reset "on target" variables */ popsettings( s ); freesettings( s ); /* * Step 3: recursively make0bscan() dependents & headers */ /* Step 3a: recursively make0bscan() dependents */ for( c = t->depends; c; c = c->next ) make0bscan( c->target ); /* Step 3b: recursively make0() includes */ for( c = t->includes; c; c = c->next ) make0bscan( c->target ); } /* * make0includes() - propagate INCLUDES through the tree */ static void make0includes( TARGET *t ) { TARGETS *c; SETTINGS *s; /* * Step 1: initialize */ if ( t->makeflags & T_MAKEFLAG_INCLUDES ) return; t->makeflags |= T_MAKEFLAG_INCLUDES; /* * Step 2: gather all the INCLUDES of this target. */ make0gatherincludes(t); /* * Step 3: recursively make0includes() dependents & headers */ /* Step 3a: recursively make0includes() dependents */ for( c = t->depends; c; c = c->next ) make0includes( c->target ); /* Step 3b: recursively make0() internal includes node */ for( c = t->includes; c; c = c->next ) make0includes( c->target ); } /* * make0gatherincludes() - gather all of the target's internal nodes * (INCLUDES) nodes into a list of t's dependencies that are not in * the T_MAKE_DONE state. */ static void make0gatherincludes( TARGET *t ) { TARGETS *chain = 0; TARGETS *c; /* Increment the gather generation. Each generation * represents a given target's INCLUDES list. */ t->mark = ++mark_generation; /* Mark this target's includes as being in the current * INCLUDES list */ for(c = t->includes; c; c = c->next) { c->target = bindtarget(c->target->name); c->target->mark = mark_generation; } /* For each of the target's direct INCLUDES, go off and find * the INCLUDES's INCLUDES, etc., recursively. */ for(c = t->includes; c; c = c->next) { chain = make0gatherincludes2(t->name, chain, c->target); } /* Append the newly found INCLUDES to this target's list of * direct INCLUDES. Now t->includes contains all INCLUDES * targets, direct and indirect. */ t->includes = targetchain(t->includes, chain); } static TARGETS* make0gatherincludes2( const char* tname, TARGETS *chain, TARGET* t ) { TARGETS *c; /* For each of this target's INCLUDES that aren't already part of this gather generation, append it to the chain and recurse. */ for (c = t->includes; c; c = c->next) { c->target = bindtarget(c->target->name); if (c->target->mark != mark_generation) { c->target->mark = mark_generation; chain = targetentry(chain, c->target); chain = make0gatherincludes2(tname, chain, c->target); } } return chain; } /* make0sort() - reorder TARGETS chain by their time (newest to oldest) */ static TARGETS * make0sort( TARGETS *chain ) { TARGETS *result = 0; /* We walk chain, taking each item and inserting it on the */ /* sorted result, with newest items at the front. This involves */ /* updating each TARGETS' c->next and c->tail. Note that we */ /* make c->tail a valid prev pointer for every entry. Normally, */ /* it is only valid at the head, where prev == tail. Note also */ /* that while tail is a loop, next ends at the end of the chain. */ /* Walk current target list */ while( chain ) { TARGETS *c = chain; TARGETS *s = result; chain = chain->next; /* Find point s in result for c */ while( s && s->target->time > c->target->time ) s = s->next; /* Insert c in front of s (might be 0). */ /* Don't even think of deciphering this. */ c->next = s; /* good even if s = 0 */ if( result == s ) result = c; /* new head of chain? */ if( !s ) s = result; /* wrap to ensure a next */ if( result != c ) s->tail->next = c; /* not head? be prev's next */ c->tail = s->tail; /* take on next's prev */ s->tail = c; /* make next's prev us */ } return result; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 4044 | Matt Armstrong |
Fix //guest/matt_armstrong/jam/bug/3/... (as well as 2/... and 1/...). Introduce a pass *before* make0() that propagates INCLUDES relationships fully thruout the dependency graph. bug/3 was caused by make0 trying to do too much at once. You can't properly deal with cycles in the INCLUDES graph and correctly determine dependencies in one pass. We now have three passes through the dependency graph in make.c 1) make0bscan() - bind and scan all targets in the tree 2) make0includes() - gather all INCLUDES from sub-INCLUDES in a way that is safe from cycles in the INCLUDES graph. 3) make0() - fate determination TODO: verify correct bindtarget() use in make0bscan() and make0includes() |
||
#6 | 4016 | Matt Armstrong |
Split make.c into two phases -- make0bscan() and make0(). make0bscan() does binding and header scanning, and make0() does fate determination. This two pass approach completely isolates fate determination from header scanning, and so eliminates problems where circular INCLUDE dependencies caused the old make0() to incorrectly determine the fate of targets (see //guest/matt_armstrong/jam/bug/3/...). |
||
#5 | 3968 | Matt Armstrong |
Fix //guest/matt_armstrong/jam/bug/1/... and //guest/matt_armstrong/jam/bug/2/... in one go. jam2.5rc3 attempts to turn INCLUDES into DEPENDS by turning every INCLUDES into an implicit node in the dependency graph. The problem with this approach is that make.c and make1.c algorithms work only with acyclic graphs, and INCLUDES relationships are often cyclic. This branch backs out //public/jam/src/... changes 2614 and 3057 and merges in //guest/matt_armstrong/jam/fix/includes/... changes 2573, 2574 and 2575. The end result is that make.c now copies a target's INCLUDES to its DEPENDS list as it walks through the graph. The end result is that at the end of make.c, every target's DEPENDS list includes all its direct dependencies *and* all of the implicit dependencies that INCLUDES creates. This creates more nodes, but is immune to cycles in the INCLUDES chain. An alternative approach would be to change every use of t->depends to use a smart iterator. The iterator would generate a temporary list containing all of t->depends and all of associated INCLUDES. This list would be iterated over and disposed. I didn't take this approach because it was more complex, and I rather like the -dd debug output my patch generates (i.e. the "implicit" lines for DEPENDS and INCLUDES relationships that are implicitly created via INCLUDES). |
||
#4 | 3966 | Matt Armstrong | Ignore change 3057 from //public/jam/src/... | ||
#3 | 3965 | Matt Armstrong |
Integrate from //public/jam/src/... through change 3056. |
||
#2 | 3964 | Matt Armstrong | Integrate change 2614 from //public/jam/src/..., but ignore it. | ||
#1 | 3963 | Matt Armstrong |
Branch from //public/jam/src/... up to change 2613. |
||
//guest/perforce_software/jam/src/make.c | |||||
#16 | 2613 | rmg |
Fix 'actions updated' broken by 2487. The idea was that dependents of NOTFILE targets (like "all") shouldn't be T_FATE_NEWER (newer than their parents), but instead left as T_FATE_STABLE. That way the new 'jam -dc' (display "causes") option didn't report spurious "newer" targets. NOTFILE targets have a 0 timestamp, making their children always look newer, and the change was to suppress this. But instead of checking for NOTFILE parents, the code checked for missing parents. And that broke 'actions updated', because it relied on T_FATE_NEWER even if the parent was missing. Now it checks for p->binding != T_BIND_UNBOUND (the mark of a NOTFILE target), rather than p->binding == T_BIND_EXISTS (the mark of an existing real target). === computer:1666: Change 39756 by seiwald@play-seiwald on 2003/01/03 14:53:11 |
||
#15 | 2529 | rmg |
Fix "on target" variables during header scan, from Matt Armstrong. Setting target-specific variables while under the influence of the target's target-specific variables caused the _global_ values to be modified. This happened both during header file scanning and with the "on target statement" syntax. The manifestation of this was if a file #included itself, HdrRule would accidentally set HDRRULE/HDRSCAN globally, and then all files (executables, etc) would get scanned for includes. While this borrows from Matt's fix, it is a slightly different implementation. User visible fix documented in RELNOTES. === computer:1666: Change 39095 by seiwald@play-seiwald on 2002/12/17 14:00:58 |
||
#14 | 2528 | rmg |
Rewrite comments in 39049, so that there are not two 4b's. No functional change. === computer:1666: Change 39076 by seiwald@play-seiwald on 2002/12/17 11:21:15 |
||
#13 | 2527 | rmg |
Fix to 38399 [Public Depot 2499], which broke 35018 [2484], which made make0() consider headers when deciding whether to update a temporary source file. Now we deliberately scan the list of included headers to see if their update time is newer than the target's parents, which can cause that target to get built if it is a temp. Change to unreleased behavior. === computer:1666: Change 39049 by seiwald@play-seiwald on 2002/12/16 21:21:04 |
||
#12 | 2499 | rmg |
Fix 'includes' support so that included files aren't treated as direct dependencies during the command execution phase. If an included file failed to build, make1() would bypass the including file. Now make0() appends each child's 'includes' onto its own 'depends' list, eliminating 'includes'-specific code in make0() and make1(). This not only fixes the bug, but removes some complexity as well. Bug fix documented in RELNOTES. === computer:1666: Change 38399 by seiwald@play-seiwald on 2002/12/03 16:00:40 |
||
#11 | 2493 | rmg |
Rewrite the past: update all jam's source with comments to reflect changes since about 2.3, very early 2001. Whitespace only change. === computer:1666: Change 37660 by seiwald@play-seiwald on 2002/11/06 22:41:35 Note: I regenerated jamgram.c on my linux 7.3 system prior to the submit, since patch was so unhappy trying to lay down the changes from Christopher's change. Presumably this is just due to different yacc/bison/whatever particulars on the system where Christopher made the changes originally. - rmg |
||
#10 | 2491 | rmg |
Some consting in jam to make it more compilable by C++ compilers. No functional change. === computer:1666: Change 37433 by perforce@perforce on 2002/10/30 16:08:51 Recreational const-ing of jam, for compilers that don't allow "string" to be passed as a non-const char *. This included a few places where we were modifying what could possibly have been read-only storage, oddly enough. No functional change. === computer:1666: Change 37602 by seiwald@play-seiwald on 2002/11/04 17:25:40 |
||
#9 | 2487 | rmg |
Subtle jam adjustments in make0() to improve tracing output, and some new tracing output (-dc: show 'causes'). First, make0() now takes a pointer p to the parent, rather than just the parent time ptime. This helps when setting the T_FATE_NEWER: it's only set if the target is newer than the parent _and the parent exists_. Otherwise, T_FATE_NEWER gets set for all dependenents of NOTFILE targets. When determining fate, don't make the final check to see if we need to downgrade T_FATE_NEWER to T_FATE_STABLE: fate is always T_FATE_NEWER or T_FATE_STABLE, so we might as well just set it to T_FATE_STABLE anyhow. New -dc output shows what targets are causing things to get rebuilt. User visible change documented in RELNOTES. === computer:1666: Change 36605 by seiwald@play-seiwald on 2002/09/28 18:26:32 |
||
#8 | 2486 | rmg |
Fooling around with jam's -d flag, to make it possible to specify useful display output without turning on loads of debugging crud. New -dd flag to display dependencies. Provisional changes not yet documented in jam.html. === computer:1666: Change 36374 by seiwald@play-seiwald on 2002/09/19 15:17:20 Jam -d change: the message "...using xxx..." now only shows up with -da, rather than in the default output. It made it hard to see what was happening when there were a lot of temp files lying around. User visible change documented in RELNOTES. === computer:1666: Change 36430 by seiwald@play-seiwald on 2002/09/23 11:34:12 Put jam -dx flags into 'jam -h'. Change to undocumented behavior (jam -h's output). === computer:1666: Change 36551 by seiwald@play-seiwald on 2002/09/26 14:39:54 Document jam's new -d debug flags. === computer:1666: Change 37367 by seiwald@waffle-cyg-seiwald on 2002/10/28 16:03:46 jam -n now implies -dax, just as the old jam -n implied -d2. Change to unreleased functionality. === computer:1666: Change 37550 by seiwald@waffle-cyg-seiwald on 2002/11/03 23:12:15 |
||
#7 | 2484 | rmg |
Rework make0() to consider headers when deciding whether to update a temporary source file. This makes it possible to have generated, temporary source files that must be regened because an included header has been updated. === computer:1666: Change 35018 by seiwald@play-seiwald on 2002/07/17 10:41:35 Followon to 35018: actually update a "needtmp" target (duh). === computer:1666: Change 35023 by seiwald@play-seiwald on 2002/07/17 11:10:16 Fix to 35018, which handled out-of-date header files built from temporary sources. Unfortunately, the change made circular header dependencies (which are legion) get reported. Now the circular dependency reporting is done in the call to make0() rather than at the beginning of make0(), and step 3b (the header recursion) simply skips that check. Change to unreleased behavior. === computer:1666: Change 36247 by seiwald@waffle-cyg-seiwald on 2002/09/16 16:15:10 |
||
#6 | 1553 | Perforce staff |
New -g flag to reorder targets so that they are built according to their sources update times, rather than simply the order in which they appear in the Jamfiles. This flag is experimental: it isn't clear if sorting on target time is adequate to ensure newest sources are seen first, and it isn't clear that this is actually useful at all. Undocumented except for a note in RELNOTES. |
||
#5 | 1545 | Perforce staff |
Handle TEMPORARY targets with multiple parents better (but not perfectly). Previously, a TEMPORARY target that had no timestamp of its own (t->time == 0, due to the target being missing) took on its parent's timestamp ptime. The target's timestamp is used for four things: 1. It is passed as the target's timestamp to its children, in case they are also TEMPORARY targets (and thus need their parent's timestamp). 2. It is compared against the target's children's timestamps, to see if the target is out of date. 3. It is compared against the target's parent time, to see if the target is newer than its parent (for 'actions updated'). 4. It is saved as the target's timestamp, for when the target's parents need to see if they are out of date. The problem was with (4) and multiple parents: the first parent's timestamp would become the target's, which could then inadvertantly outdate another parent older than the first but otherwise up-to-date. With this change a missing TEMPORARY target is left with a zero timestamp, and the four above cases are modified for T_BIND_PARENT targets as such: 1. The parent's timestamp is passed directly to the target's children. 2. The parent's timestamp is compared directly against the target's children's timestamps. 3. The parent's timestamp is no longer compared against the target's own, as it could never be older. 4. The target's timestamp remains zero (or the newest of the target's children's), so as not to outdate other parents. Oddly enough, this change mostly just removes the setting of 't->time = ptime' (leaving t->time zero), and adds only a little extra logic to use ptime directly when needed. It also removes the 'pbinding' parameter to make0(), as its only use (to indicate if the parent was missing) can better be divined from !ptime. Perfection, as they say, isn't achieved when there is nothing more to add, but nothing more to take away. We'll see if I removed enough this time. Bug fix documented in RELNOTES. |
||
#4 | 556 | Perforce staff |
Patch release jam 2.3.2: reverse NOCARE change. NOCARE once again applies to targets with source and/or actions, so that buildable header files get built. |
||
#3 | 486 | Perforce staff |
Jam 2.3. See RELNOTES for a list of changes from 2.2.x. Just about every source file was touched when jam got ANSI-fied. |
||
#2 | 214 | Perforce staff |
Peter Glasscock's NOUPDATE fix, so that a missing dependency doesn't force the update of a NOUPDATE target. NOUPDATE targets should only be updated if they don't exist. |
||
#1 | 2 | laura | Add Jam/MR 2.2 source |