aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/builtin-options.ixx
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/build/script/builtin-options.ixx
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/build/script/builtin-options.ixx')
-rw-r--r--libbuild2/build/script/builtin-options.ixx102
1 files changed, 66 insertions, 36 deletions
diff --git a/libbuild2/build/script/builtin-options.ixx b/libbuild2/build/script/builtin-options.ixx
index 06575c8..c6266d0 100644
--- a/libbuild2/build/script/builtin-options.ixx
+++ b/libbuild2/build/script/builtin-options.ixx
@@ -176,157 +176,187 @@ namespace build2
{
namespace script
{
- // depdb_dep_options
+ // depdb_dyndep_options
//
- inline const path& depdb_dep_options::
+ inline const path& depdb_dyndep_options::
file () const
{
return this->file_;
}
- inline path& depdb_dep_options::
+ inline path& depdb_dyndep_options::
file ()
{
return this->file_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
file (const path& x)
{
this->file_ = x;
}
- inline bool depdb_dep_options::
+ inline bool depdb_dyndep_options::
file_specified () const
{
return this->file_specified_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
file_specified (bool x)
{
this->file_specified_ = x;
}
- inline const string& depdb_dep_options::
+ inline const string& depdb_dyndep_options::
format () const
{
return this->format_;
}
- inline string& depdb_dep_options::
+ inline string& depdb_dyndep_options::
format ()
{
return this->format_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
format (const string& x)
{
this->format_ = x;
}
- inline bool depdb_dep_options::
+ inline bool depdb_dyndep_options::
format_specified () const
{
return this->format_specified_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
format_specified (bool x)
{
this->format_specified_ = x;
}
- inline const string& depdb_dep_options::
+ inline const string& depdb_dyndep_options::
what () const
{
return this->what_;
}
- inline string& depdb_dep_options::
+ inline string& depdb_dyndep_options::
what ()
{
return this->what_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
what (const string& x)
{
this->what_ = x;
}
- inline bool depdb_dep_options::
+ inline bool depdb_dyndep_options::
what_specified () const
{
return this->what_specified_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
what_specified (bool x)
{
this->what_specified_ = x;
}
- inline const dir_paths& depdb_dep_options::
+ inline const dir_paths& depdb_dyndep_options::
include_path () const
{
return this->include_path_;
}
- inline dir_paths& depdb_dep_options::
+ inline dir_paths& depdb_dyndep_options::
include_path ()
{
return this->include_path_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
include_path (const dir_paths& x)
{
this->include_path_ = x;
}
- inline bool depdb_dep_options::
+ inline bool depdb_dyndep_options::
include_path_specified () const
{
return this->include_path_specified_;
}
- inline void depdb_dep_options::
+ inline void depdb_dyndep_options::
include_path_specified (bool x)
{
this->include_path_specified_ = x;
}
- inline const string& depdb_dep_options::
- default_prereq_type () const
+ inline const string& depdb_dyndep_options::
+ default_type () const
{
- return this->default_prereq_type_;
+ return this->default_type_;
}
- inline string& depdb_dep_options::
- default_prereq_type ()
+ inline string& depdb_dyndep_options::
+ default_type ()
{
- return this->default_prereq_type_;
+ return this->default_type_;
}
- inline void depdb_dep_options::
- default_prereq_type (const string& x)
+ inline void depdb_dyndep_options::
+ default_type (const string& x)
{
- this->default_prereq_type_ = x;
+ this->default_type_ = x;
}
- inline bool depdb_dep_options::
- default_prereq_type_specified () const
+ inline bool depdb_dyndep_options::
+ default_type_specified () const
{
- return this->default_prereq_type_specified_;
+ return this->default_type_specified_;
}
- inline void depdb_dep_options::
- default_prereq_type_specified (bool x)
+ inline void depdb_dyndep_options::
+ default_type_specified (bool x)
{
- this->default_prereq_type_specified_ = x;
+ this->default_type_specified_ = x;
+ }
+
+ inline const dir_path& depdb_dyndep_options::
+ cwd () const
+ {
+ return this->cwd_;
+ }
+
+ inline dir_path& depdb_dyndep_options::
+ cwd ()
+ {
+ return this->cwd_;
+ }
+
+ inline void depdb_dyndep_options::
+ cwd (const dir_path& x)
+ {
+ this->cwd_ = x;
+ }
+
+ inline bool depdb_dyndep_options::
+ cwd_specified () const
+ {
+ return this->cwd_specified_;
+ }
+
+ inline void depdb_dyndep_options::
+ cwd_specified (bool x)
+ {
+ this->cwd_specified_ = x;
}
}
}