diff options
Diffstat (limited to 'CC/foreign/cmake')
-rw-r--r-- | CC/foreign/cmake/EXPRESSIONS | 11 | ||||
-rw-r--r-- | CC/foreign/cmake/RULES | 12 |
2 files changed, 20 insertions, 3 deletions
diff --git a/CC/foreign/cmake/EXPRESSIONS b/CC/foreign/cmake/EXPRESSIONS index 3d277fe..b4a9147 100644 --- a/CC/foreign/cmake/EXPRESSIONS +++ b/CC/foreign/cmake/EXPRESSIONS @@ -24,6 +24,7 @@ , "BUILD_POSITION_INDEPENDENT" , "defaults-transition" , "expand_exec" + , "resolve_symlinks" ] , "imports": { "artifacts": ["", "field_artifacts"] @@ -336,9 +337,13 @@ } } } - , [ "mv install install_with_symlinks" - , "cp -rL install_with_symlinks install" - ] + , { "type": "if" + , "cond": {"type": "var", "name": "resolve_symlinks"} + , "then": + [ "mv install install_with_symlinks" + , "cp -rL install_with_symlinks install >copy.log 2>&1 || (echo 'ERROR: symlink resolve failed with:' && cat copy.log && exit 1)" + ] + } , { "type": "if" , "cond": {"type": "var", "name": "post_cmds"} , "then": diff --git a/CC/foreign/cmake/RULES b/CC/foreign/cmake/RULES index b36bc73..166e2d6 100644 --- a/CC/foreign/cmake/RULES +++ b/CC/foreign/cmake/RULES @@ -18,6 +18,7 @@ , "post_cmds" , "out_files" , "out_dirs" + , "resolve_symlinks" ] , "config_vars": [ "ARCH" @@ -78,6 +79,10 @@ , "accessed via \"$CMAKE_SOURCE_DIR\" and \"$CMAKE_BINARY_DIR\"," , "respectively." ] + , "resolve_symlinks": + [ "Resolve all symlinks in the install directory. This operation is" + , "performed immediately after the install, before \"post_cmds\" are run." + ] , "out_files": [ "Paths to the produced output files. The paths are considered relative" , "to the install directory." @@ -204,6 +209,7 @@ , ["cmake_jobs", {"type": "FIELD", "name": "jobs"}] , ["pre_cmds", {"type": "FIELD", "name": "pre_cmds"}] , ["post_cmds", {"type": "FIELD", "name": "post_cmds"}] + , ["resolve_symlinks", {"type": "FIELD", "name": "resolve_symlinks"}] , ["defaults-transition", {"type": "empty_map"}] , [ "expand_exec" , { "type": "let*" @@ -291,6 +297,7 @@ , "hdr_prefix" , "lib_prefix" , "pc_prefix" + , "resolve_symlinks" ] , "config_vars": [ "ARCH" @@ -358,6 +365,10 @@ , "source and build directory can be accessed via \"$CMAKE_SOURCE_DIR\"" , "and \"$CMAKE_BINARY_DIR\", respectively." ] + , "resolve_symlinks": + [ "Resolve all symlinks in the install directory. This operation is" + , "performed immediately after the install, before \"post_cmds\" are run." + ] , "out_hdrs": [ "Paths to produced public header files. The path is considered" , "relative to the include directory, which be set via \"hdr_prefix\"." @@ -607,6 +618,7 @@ , ["cmake_jobs", {"type": "FIELD", "name": "jobs"}] , ["pre_cmds", {"type": "FIELD", "name": "pre_cmds"}] , ["post_cmds", {"type": "FIELD", "name": "post_cmds"}] + , ["resolve_symlinks", {"type": "FIELD", "name": "resolve_symlinks"}] , ["defaults-transition", {"type": "empty_map"}] , [ "expand_exec" , { "type": "let*" |