aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/adhoc-rule-buildscript.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-11-30 10:15:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-11-30 10:42:02 +0200
commit76f1988539c477ad3b906f254654929aec04283c (patch)
tree5d824b8a3db4d95c79ddf6903f530ae578daffaf /libbuild2/adhoc-rule-buildscript.hxx
parent445c89468c7d361fe891aa09f2c28e943f6fe7c5 (diff)
Add support for dynamic dependencies as byproduct of script body
Specifically, the `depdb dyndep` builtin now has the --byproduct option (which must come first). In this mode only the --file input is supported. For example: obje{hello.o}: cxx{hello} {{ o = $path($>) t = $(o).t depdb dyndep --byproduct --what=header --default-type=h --file $t diag c++ ($<[0]) $cxx.path $cxx.poptions $cc.poptions $cc.coptions $cxx.coptions $cxx.mode -o $o -MD -MF $t -c $path($<[0]) }} Naturally, this mode does not support dynamic auto-generated prerequisites. If present, such prerequisites must be specified statically in the buildfile. Note also that the --default-prereq-type option has been rename to --default-type.
Diffstat (limited to 'libbuild2/adhoc-rule-buildscript.hxx')
-rw-r--r--libbuild2/adhoc-rule-buildscript.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbuild2/adhoc-rule-buildscript.hxx b/libbuild2/adhoc-rule-buildscript.hxx
index 51d37d4..c39a0c0 100644
--- a/libbuild2/adhoc-rule-buildscript.hxx
+++ b/libbuild2/adhoc-rule-buildscript.hxx
@@ -39,10 +39,15 @@ namespace build2
perform_update_file (action, const target&) const;
struct match_data;
+ struct match_data_byproduct;
target_state
perform_update_file_dyndep (action, const target&, match_data&) const;
+ target_state
+ perform_update_file_dyndep_byproduct (
+ action, const target&, match_data_byproduct&) const;
+
bool
execute_update_file (const scope&,
action a, const file&,