From: Mikko Rasa Date: Tue, 3 Jan 2023 17:06:45 +0000 (+0200) Subject: Mark side effects for rebuilding together with their primary targets X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=504ad60b7c3a0f821e4443a24052a261ddb409c7;p=builder.git Mark side effects for rebuilding together with their primary targets --- diff --git a/source/lib/filetarget.cpp b/source/lib/filetarget.cpp index a2bd3f0..a2d4ea4 100644 --- a/source/lib/filetarget.cpp +++ b/source/lib/filetarget.cpp @@ -83,6 +83,8 @@ void FileTarget::check_rebuild() auto i = find_if(side_effects, [](const Target *s){ return s->needs_rebuild(); }); if(i!=side_effects.end()) mark_rebuild((*i)->get_name()+" needs rebuilding"); + if(primary_target && primary_target->needs_rebuild()) + mark_rebuild(primary_target->get_name()+" needs rebuilding"); } if(!needs_rebuild() && package)