⛏️ index : buildtools.git

author Jessica Hamilton <jessica.l.hamilton@gmail.com> 2014-10-21 19:33:28.0 +13:00:00
committer Jessica Hamilton <jessica.l.hamilton@gmail.com> 2014-10-21 20:57:59.0 +13:00:00
commit
c2607d0bbd6ff799a1a399a2edf02a6648cf6d28 [patch]
tree
f5edee81e3f4668167765f56932dbc15c77169a5
parent
d86116d57a09505802ed6a38adc43ef294f7f364
download
c2607d0bbd6ff799a1a399a2edf02a6648cf6d28.tar.gz

jam: add internal dependencies for multi-file generating actions

* Based on https://svn.boost.org/trac/boost/changeset/39341

Diff

 jam/compile.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/jam/compile.c b/jam/compile.c
index efe84a6..9091613 100644
--- a/jam/compile.c
+++ b/jam/compile.c
@@ -576,6 +576,25 @@
	    action->rule = rule;
	    action->targets = targetlist( (TARGETS *)0, lol_get( args, 0 ) );
	    action->sources = targetlist( (TARGETS *)0, lol_get( args, 1 ) );
	    
	    /* Make targets[1,N-1] depend on targets[0], to describe the */
	    /* generated targets for the rule. Do it with includes, to */
	    /* reflect non-build dependency. */
	    
	    if( action->targets )
	    {
	    	TARGET *t0 = action->targets->target;
	    	for( t = action->targets->next; t; t = t->next )
	    	{
	    		TARGET *tn = t->target;
	    		if( !tn->includes )
	    		{
	    			tn->includes = copytarget( tn );
	    		}
	    		tn = tn->includes;
	    		tn->depends = targetentry( tn->depends, t0 );
	    	}
	    }

	    /* Append this action to the actions of each target */