aboutsummaryrefslogtreecommitdiff
path: root/build2/algorithm.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-02 15:02:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-02 15:02:02 +0200
commit4b9de5c80934772dbc5503e65e265da452ca356a (patch)
tree18678181705b6f3346038f72003f915c35b676a9 /build2/algorithm.hxx
parenta0a8eaabb234d880464f389f7dee89e430c84b32 (diff)
Add support for different backlinking modes, use for Windows DLL assembly
Diffstat (limited to 'build2/algorithm.hxx')
-rw-r--r--build2/algorithm.hxx29
1 files changed, 24 insertions, 5 deletions
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 <build2/algorithm.ixx>