Without this, -W did not cause includes to be read if they were present
in the cache. It'll also come in handy for generated source files some
time in the future.
add_dependency(*hdr);
}
}
+
+void CSourceFile::modified()
+{
+ includes.clear();
+ depends.clear();
+ find_dependencies();
+}
const IncludeList &get_includes() const { return includes; }
private:
virtual void find_dependencies();
+ virtual void modified();
};
#endif
void FileTarget::touch()
{
mtime = Time::now();
+ modified();
signal_bubble_rebuild.emit();
}
return task;
}
-void Target::build_finished(bool /*success*/)
+void Target::build_finished(bool success)
{
state = UPTODATE;
+ if(success)
+ modified();
}
/** Handler for Task::signal_finished. */
virtual void build_finished(bool);
+ virtual void modified() { }
+
public:
/** Removes any results of building the target. */
virtual void clean() { }