Skip to content

Commit

Permalink
build: Remove debugging prints.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Apr 9, 2024
1 parent 215f19d commit ae91ade
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions install.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ def _install_impl(ctx):

# Like https://www.gnu.org/prep/standards/html_node/DESTDIR.html#DESTDIR
output = ctx.actions.declare_file("install_script")
commands = "#!/usr/bin/env bash\nexport RUNFILES_LIB_DEBUG=1\ncat $0\n" + RUNFILES_BOILERPLATE
commands = "#!/usr/bin/env bash\n" + RUNFILES_BOILERPLATE
runfiles = ctx.runfiles(files = [ctx.file._bash_runfile_helper])
for target in ctx.attr.targets:
print(target)
target_dir = ctx.attr.prefix + ctx.attr.targets.get(target)
commands += "install -d {}\n".format(target_dir)
mode = "-m 644"

# Like https://www.gnu.org/prep/standards/html_node/Command-Variables.html#Command-Variables
if target[DefaultInfo].files_to_run and target[DefaultInfo].files_to_run.executable:
mode = ""
print(target, target[DefaultInfo].files.to_list())
installables = ["$(rlocation _main/{})".format(x.short_path) for x in target[DefaultInfo].files.to_list()]
commands += "install {mode} {target} {dest}\n".format(mode = mode, target = " ".join(installables), dest = target_dir)
runfiles = runfiles.merge_all([
Expand Down

0 comments on commit ae91ade

Please sign in to comment.