Kaydet (Commit) 53ba304c authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS dmake411 (1.11.4); FILE MERGED

2007/09/14 03:40:58 vq 1.11.4.5: #i81296# Clear flags indicating that targets that infered makefiles (and
their prerequisites) were previously build.
2007/09/14 00:09:00 vq 1.11.4.4: #i81296# Remove bit recycling for F_VISITED/F_USED. Use only F_VISITED.
2007/09/08 18:20:35 vq 1.11.4.3: #i10000# Add some output for .INCLUDE operations when the -vf verbose
flag is given.
2007/08/09 01:43:17 vq 1.11.4.2: #i67709# Improve parsing of group recipes.
2007/08/07 01:54:12 vq 1.11.4.1: #i66448# Clarify prerequisites for %-targets.
üst de1ebb77
/* $RCSfile: rulparse.c,v $ /* $RCSfile: rulparse.c,v $
-- $Revision: 1.11 $ -- $Revision: 1.12 $
-- last change: $Author: obo $ $Date: 2007-06-12 06:06:50 $ -- last change: $Author: ihi $ $Date: 2007-10-15 15:41:24 $
-- --
-- SYNOPSIS -- SYNOPSIS
-- Perform semantic analysis on input -- Perform semantic analysis on input
...@@ -230,13 +230,13 @@ int *state; ...@@ -230,13 +230,13 @@ int *state;
} }
} }
else { else {
/* found an operator so empty out break list /* found an operator so empty out break list and clear mark
* and clear mark bits on target list, setting them all to F_USED*/ * bits on target list, setting them all to F_VISITED*/
brk = ""; brk = "";
for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) { for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) {
cp->ce_flag ^= F_MARK; cp->ce_flag ^= F_MARK;
cp->ce_flag |= F_USED; cp->ce_flag |= F_VISITED;
} }
Def_targets = FALSE; Def_targets = FALSE;
...@@ -258,7 +258,7 @@ int *state; ...@@ -258,7 +258,7 @@ int *state;
Fatal( "Syntax error in %% rule, missing %% target"); Fatal( "Syntax error in %% rule, missing %% target");
} }
if( cp->ce_flag & F_USED ) { if( cp->ce_flag & F_VISITED ) {
if( cp->ce_attr & A_COMPOSITE ) if( cp->ce_attr & A_COMPOSITE )
continue; continue;
else else
...@@ -321,7 +321,7 @@ int *state; ...@@ -321,7 +321,7 @@ int *state;
* so I bit the bullit and added these two loops. */ * so I bit the bullit and added these two loops. */
for( cp=prereq; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_MARK; for( cp=prereq; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_MARK;
for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_USED; for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) cp->ce_flag &= ~F_VISITED;
/* Check to see if the previous recipe was bound, if not the call /* Check to see if the previous recipe was bound, if not the call
* Bind_rules_to_targets() to bind the recipe (_sv_rules) to the * Bind_rules_to_targets() to bind the recipe (_sv_rules) to the
...@@ -335,15 +335,6 @@ int *state; ...@@ -335,15 +335,6 @@ int *state;
if( _sv_rules != NIL(STRING) ) if( _sv_rules != NIL(STRING) )
Fatal( "Internal Error: _sv_rules not empty." ); Fatal( "Internal Error: _sv_rules not empty." );
/* The target can be already build, e.g. as infered makefile for
* the .INCLUDE directive. Clean F_MADE and F_STAT when recipes
* or prerequisites are changed. */
if( (prereq != NIL(CELL)) || (_sv_rules != NIL(STRING)) )
for( cp=targets; cp != NIL(CELL); cp=cp->ce_link ) {
DB_PRINT( "par", ("Cleaning %s flags %04x", cp->CE_NAME, cp->ce_flag) );
cp->ce_flag &= ~(F_STAT|F_MADE);
}
/* Add the first recipe line to the list */ /* Add the first recipe line to the list */
if( firstrcp != NIL( char ) ) if( firstrcp != NIL( char ) )
Add_recipe_to_list( firstrcp, TRUE, FALSE ); Add_recipe_to_list( firstrcp, TRUE, FALSE );
...@@ -505,10 +496,10 @@ int flag; ...@@ -505,10 +496,10 @@ int flag;
/* Bind the current set of prerequisites as belonging to the /* Bind the current set of prerequisites as belonging to the
* original recipe given for the target */ * original recipe given for the target */
for( lp=tg->ce_prq; lp != NIL(LINK); lp = lp->cl_next ) for( lp=tg->ce_prq; lp != NIL(LINK); lp = lp->cl_next )
if( !(lp->cl_flag & F_USED) ) lp->cl_flag |= F_TARGET; if( !(lp->cl_flag & F_VISITED) ) lp->cl_flag |= F_TARGET;
} }
else for( lp=tg->ce_prq; lp != NIL(LINK); lp = lp->cl_next ) else for( lp=tg->ce_prq; lp != NIL(LINK); lp = lp->cl_next )
lp->cl_flag |= F_USED; lp->cl_flag |= F_VISITED;
} }
tflag |= _add_root(tg); tflag |= _add_root(tg);
...@@ -540,10 +531,20 @@ Set_group_attributes( list )/* ...@@ -540,10 +531,20 @@ Set_group_attributes( list )/*
char *list; char *list;
{ {
int res = FALSE; int res = FALSE;
char *s;
if ( !((_sv_attr|Glob_attr)&A_IGNOREGROUP) ) { if ( !((_sv_attr|Glob_attr)&A_IGNOREGROUP) ) {
res = (*DmStrSpn(list,"@-%+ \t") == '['); s = DmStrSpn(list,"@-%+ \t");
if( res ) _sv_attr |= Rcp_attribute(list); res = (*s == '[');
if( res ) {
/* Check for non-white space characters after the [. */
for( s++; *s && iswhite(*s) ; s++ )
;
if( *s )
Warning("Found non-white space character after '[' in [%s].", list);
_sv_attr |= Rcp_attribute(list);
}
} }
return(res); return(res);
...@@ -724,6 +725,9 @@ int *state; ...@@ -724,6 +725,9 @@ int *state;
Glob_attr |= (attr&A_IGNORE); Glob_attr |= (attr&A_IGNORE);
prqlst->cl_prq->ce_attr &= ~A_FRINGE; prqlst->cl_prq->ce_attr &= ~A_FRINGE;
if( Verbose & V_FILE_IO )
printf( "%s: Inferring include file [%s].\n",
Pname, name );
fil = TryFiles(prqlst); fil = TryFiles(prqlst);
Glob_attr = glob; Glob_attr = glob;
...@@ -731,11 +735,17 @@ int *state; ...@@ -731,11 +735,17 @@ int *state;
} }
if( fil != NIL(FILE) ) { if( fil != NIL(FILE) ) {
if( Verbose & V_FILE_IO )
printf( "%s: Parsing include file [%s].\n",
Pname, name );
Parse( fil ); Parse( fil );
found = TRUE; found = TRUE;
} }
else if( !(ignore || first) ) else if( !(ignore || first) )
Fatal( "Include file %s, not found", name ); Fatal( "Include file %s, not found", name );
else if( Verbose & V_FILE_IO )
printf( "%s: Include file [%s] was not found.\n",
Pname, name );
} }
if ( !ignore && first && !found ) if ( !ignore && first && !found )
...@@ -943,14 +953,12 @@ CELLPTR prereq; /* list of prerequisites */ ...@@ -943,14 +953,12 @@ CELLPTR prereq; /* list of prerequisites */
} }
} }
else { else {
/* Multiple prerequisits require all of them match for this /* The inference mechanism for %-targets limits the number of
* %-target to be chosen. */ * (non-indirect) prerequisite to one, but an unlimited number
/* FIXME: There seem to be problems in the target inference * of indirect prerequisites is possible. */
* if multiple prerequisites are provided. */
if ( nprq && nprq->ce_link && !(op & R_OP_OR)) if ( nprq && nprq->ce_link && !(op & R_OP_OR))
Warning("More than one prerequisite\n" Warning("More than one prerequisite\n"
"for %%-target without :| as ruleop. Only the first is currently used.\n" "for %%-target. Use :| ruleop or indirect prerequisites.");
"Check your makefiles!.\n");
_build_graph(op,tg1,nprq); _build_graph(op,tg1,nprq);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment