If the primary target depends on its own side effect (such as a generated
source file including a header generated by the same command), this could
cause the side effect's prepare() to be entered recursively.
void Target::prepare()
{
+ if(primary_target && primary_target->state<PREPARING)
+ primary_target->prepare();
+
if(state>PREPARING)
return;
if(state==PREPARING)
}
state = PREPARING;
- if(primary_target)
- primary_target->prepare();
/* Prepare existing dependencies early, because their information may be
needed to find other dependencies. */
for(Target *d: depends)