diff options
Diffstat (limited to 'libbuild2/adhoc-rule-buildscript.cxx')
-rw-r--r-- | libbuild2/adhoc-rule-buildscript.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/libbuild2/adhoc-rule-buildscript.cxx b/libbuild2/adhoc-rule-buildscript.cxx index dce82dc..e0e69dc 100644 --- a/libbuild2/adhoc-rule-buildscript.cxx +++ b/libbuild2/adhoc-rule-buildscript.cxx @@ -336,7 +336,7 @@ namespace build2 // See if we are providing the standard clean as a fallback. // if (me.fallback) - return &perform_clean_depdb; + return &perform_clean_file; // See if this is not update or not on a file-based target. // @@ -926,8 +926,8 @@ namespace build2 if (f.relative ()) { if (!byp.cwd) - fail (il) << "relative path " << f << " in make dependency " - << "declaration" << + fail (il) << "relative path '" << f << "' in make dependency" + << " declaration" << info << "consider using --cwd to specify relative path " << "base"; @@ -1387,6 +1387,21 @@ namespace build2 } target_state adhoc_buildscript_rule:: + perform_clean_file (action a, const target& t) + { + // Besides .d (depdb) also clean .t which is customarily used as a + // temporary file, such as make dependency output in depdb-dyndep. In + // fact, initially the plan was to only clean it if we have dyndep but + // there is no reason it cannot be used for something else. + // + // Note that the main advantage of using this file over something in the + // temporary directory ($~) is that it's next to other output which makes + // it easier to examine during recipe troubleshooting. + // + return perform_clean_extra (a, t.as<file> (), {".d", ".t"}); + } + + target_state adhoc_buildscript_rule:: default_action (action a, const target& t, const optional<timestamp>& deadline) const |