Skip to content

Commit b89bbab

Browse files
committed
Use source built px cli for EXECUTABLES check
Signed-off-by: Dom Del Nano <ddelnano@gmail.com> (cherry picked from commit b3286a4)
1 parent e65d3a6 commit b89bbab

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/pxl_scripts/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ genrule(
4646
":preset_queries",
4747
],
4848
outs = ["bundle-oss.json"],
49-
cmd = "export PATH_PREFIX=$$(dirname $(location //src/pxl_scripts:makefile))/; PX_BIN=../../$(location //src/pixie_cli:px) make -C $$PATH_PREFIX bundle-oss.json; cp bundle-oss.json $(@D)/bundle-oss.json",
49+
cmd = "export PATH_PREFIX=$$(dirname $(location //src/pxl_scripts:makefile))/; EXECUTABLES=../../$(location //src/pixie_cli:px) make -C $$PATH_PREFIX bundle-oss.json; cp bundle-oss.json $(@D)/bundle-oss.json",
5050
tools = [
5151
"//src/pixie_cli:px",
5252
],

src/pxl_scripts/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@
1818
dirs := bpftrace px pxbeta sotw
1919
script_files := $(foreach dir,$(dirs),$(wildcard $(dir)/**/*))
2020

21-
EXECUTABLES = px
21+
EXECUTABLES ?= px
2222
K := $(foreach exec,$(EXECUTABLES),\
2323
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
2424

2525
# Optional path prefix to use for the script_files path. Used by bazel
2626
# to ensure the scripts are in the correct location.
2727
PATH_PREFIX ?= ""
28-
PX_BIN ?= px
2928

3029
all: bundle-oss.json.gz
3130

@@ -38,7 +37,7 @@ bundle-oss.json: $(script_files)
3837
export HOME=$$TMPDIR; \
3938
trap "rm -rf $$TMPDIR" EXIT; \
4039
fi; \
41-
$(PX_BIN) create-bundle --search_path $(PWD) $(foreach dir,$(dirs),--base $(PATH_PREFIX)$(dir)) -o $(PWD)/bundle-oss.json
40+
$(EXECUTABLES) create-bundle --search_path $(PWD) $(foreach dir,$(dirs),--base $(PATH_PREFIX)$(dir)) -o $(PWD)/bundle-oss.json
4241

4342
bundle-oss.json.gz: bundle-oss.json
4443
gzip -c $< > $@

0 commit comments

Comments
 (0)