parent
e711ddb2f0
commit
3983fc9c4b
|
@ -163,8 +163,9 @@ def cc_external_rule_impl(ctx, attrs):
|
|||
"source " + shell_utils,
|
||||
"echo \"Building external library '{}'\"".format(lib_name),
|
||||
"export TMPDIR=$(mktemp -d)",
|
||||
"trap \"{ rm -rf $TMPDIR; }\" EXIT",
|
||||
"export EXT_BUILD_DEPS=$(create_tmp_dir $EXT_BUILD_ROOT)",
|
||||
"trap \"{ rm -rf $TMPDIR $EXT_BUILD_ROOT/bazel_foreign_cc_deps; }\" EXIT",
|
||||
"export EXT_BUILD_DEPS=$EXT_BUILD_ROOT/bazel_foreign_cc_deps",
|
||||
"mkdir -p $EXT_BUILD_DEPS",
|
||||
"\n".join(_copy_deps_and_tools(inputs)),
|
||||
"define_absolute_paths $EXT_BUILD_ROOT/bin $EXT_BUILD_ROOT/bin",
|
||||
"export INSTALLDIR=$EXT_BUILD_ROOT/" + outputs.installdir.path,
|
||||
|
|
|
@ -13,7 +13,7 @@ def _ninja_tool(ctx):
|
|||
])
|
||||
|
||||
ctx.actions.run_shell(
|
||||
mnemonic = "BootsrapNinja",
|
||||
mnemonic = "BootstrapNinja",
|
||||
inputs = ctx.attr.ninja_srcs.files,
|
||||
outputs = [ninja],
|
||||
tools = [],
|
||||
|
|
|
@ -123,10 +123,3 @@ function define_absolute_paths() {
|
|||
function replace_absolute_paths() {
|
||||
replace_in_files $1 $2 $REPLACE_VALUE
|
||||
}
|
||||
|
||||
# create temp directory in specific directory
|
||||
# $1 directory where to create temp directory
|
||||
function create_tmp_dir() {
|
||||
local in_folder=$1
|
||||
mktemp -d -t ${in_folder}
|
||||
}
|
||||
|
|
|
@ -123,10 +123,3 @@ function define_absolute_paths() {
|
|||
function replace_absolute_paths() {
|
||||
replace_in_files $1 $2 $REPLACE_VALUE
|
||||
}
|
||||
|
||||
# create temp directory in specific directory
|
||||
# $1 directory where to create temp directory
|
||||
function create_tmp_dir() {
|
||||
local in_folder=$1
|
||||
mktemp -d --tmpdir=${in_folder}
|
||||
}
|
Loading…
Reference in New Issue