@@ -456,6 +456,7 @@ update_file_1 (struct file *file, unsigned int depth,
456456 }
457457
458458 DBF (DB_VERBOSE , _ ("File '%s' was considered already.\n" ));
459+ p_stack_top = p_stack_top -> p_parent ;
459460 trace_pop_target (p_call_stack );
460461 return 0 ;
461462 }
@@ -467,10 +468,12 @@ update_file_1 (struct file *file, unsigned int depth,
467468 break ;
468469 case cs_running :
469470 DBF (DB_VERBOSE , _ ("Still updating file '%s'.\n" ));
471+ p_stack_top = p_stack_top -> p_parent ;
470472 trace_pop_target (p_call_stack );
471473 return 0 ;
472474 case cs_finished :
473475 DBF (DB_VERBOSE , _ ("Finished updating file '%s'.\n" ));
476+ p_stack_top = p_stack_top -> p_parent ;
474477 trace_pop_target (p_call_stack );
475478 return file -> update_status ;
476479 default :
@@ -707,6 +710,7 @@ update_file_1 (struct file *file, unsigned int depth,
707710 set_command_state (file , cs_deps_running );
708711 -- depth ;
709712 DBF (DB_VERBOSE , _ ("The prerequisites of '%s' are being made.\n" ));
713+ p_stack_top = p_stack_top -> p_parent ;
710714 trace_pop_target (p_call_stack );
711715 return 0 ;
712716 }
@@ -728,6 +732,7 @@ update_file_1 (struct file *file, unsigned int depth,
728732 OS (error , NILF ,
729733 _ ("Target '%s' not remade because of errors." ), file -> name );
730734
735+ p_stack_top = p_stack_top -> p_parent ;
731736 trace_pop_target (p_call_stack );
732737 return dep_status ;
733738 }
@@ -838,6 +843,7 @@ update_file_1 (struct file *file, unsigned int depth,
838843 }
839844
840845 notice_finished_file (file );
846+ p_stack_top = p_stack_top -> p_parent ;
841847 trace_pop_target (p_call_stack );
842848
843849 /* Since we don't need to remake the file, convert it to use the
@@ -871,6 +877,7 @@ update_file_1 (struct file *file, unsigned int depth,
871877 DBF (DB_VERBOSE , _ ("Recipe of '%s' is being run.\n" ));
872878 if ( file -> tracing & BRK_AFTER_CMD || i_debugger_stepping )
873879 enter_debugger (p_call_stack , file , 0 , DEBUG_BRKPT_AFTER_CMD );
880+ p_stack_top = p_stack_top -> p_parent ;
874881 trace_pop_target (p_call_stack );
875882 return 0 ;
876883 }
@@ -894,6 +901,7 @@ update_file_1 (struct file *file, unsigned int depth,
894901 if ( file -> tracing & BRK_AFTER_CMD || i_debugger_stepping )
895902 enter_debugger (p_call_stack , file , 0 , DEBUG_BRKPT_AFTER_CMD );
896903
904+ p_stack_top = p_stack_top -> p_parent ;
897905 trace_pop_target (p_call_stack );
898906 return file -> update_status ;
899907}
0 commit comments