From 4b9de5c80934772dbc5503e65e265da452ca356a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 May 2018 15:02:02 +0200 Subject: Add support for different backlinking modes, use for Windows DLL assembly --- build2/algorithm.hxx | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'build2/algorithm.hxx') diff --git a/build2/algorithm.hxx b/build2/algorithm.hxx index e736626..a45fd53 100644 --- a/build2/algorithm.hxx +++ b/build2/algorithm.hxx @@ -644,19 +644,38 @@ namespace build2 } // Update/clean a backlink issuing appropriate diagnostics at appropriate - // levels depending on first/changed. + // levels depending on the overload and the changed argument. // + enum class backlink_mode + { + link, // Make a symbolic link if possible, hard otherwise. + symbolic, // Make a symbolic link. + hard, // Make a hard link. + copy, // Make a copy. + overwrite // Copy over but don't remove on clean (committed gen code). + }; + void - update_backlink (const file&, const path& link, bool changed); + update_backlink (const file& target, + const path& link, + bool changed, + backlink_mode = backlink_mode::link); void - update_backlink (const path& target, const path& link, bool changed); + update_backlink (const path& target, + const path& link, + bool changed, + backlink_mode = backlink_mode::link); void - update_backlink (const path& target, const path& link); + update_backlink (const path& target, + const path& link, + backlink_mode = backlink_mode::link); void - clean_backlink (const path& link, uint16_t verbosity); + clean_backlink (const path& link, + uint16_t verbosity, + backlink_mode = backlink_mode::link); } #include -- cgit v1.1