This is an automated email from the ASF dual-hosted git repository.
wilfreds pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-release.git
The following commit(s) were added to refs/heads/master by this push:
new dda68ba [YUNIKORN-3106] move perf-tools binary to build directory
(#205)
dda68ba is described below
commit dda68baf4940c385fa546b03dc1854f1fb980719
Author: Michael Chu <[email protected]>
AuthorDate: Thu Nov 27 10:39:59 2025 +1100
[YUNIKORN-3106] move perf-tools binary to build directory (#205)
create perf-tools directory under build directory
Closes: #205
Signed-off-by: Wilfred Spiegelenburg <[email protected]>
---
perf-tools/Makefile | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/perf-tools/Makefile b/perf-tools/Makefile
index 6067e65..21888b8 100644
--- a/perf-tools/Makefile
+++ b/perf-tools/Makefile
@@ -17,7 +17,8 @@
.PHONY: build clean
-TARGET_DIR ?= target
+BASE_DIR ?= $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
+BUILD_DIR ?= ${BASE_DIR}/build/perf-tools
BINARY_DIR ?= perf-tools-bin
BINARY ?= perf-tools
@@ -25,15 +26,14 @@ GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
build: clean
- @mkdir ${TARGET_DIR}
- @mkdir ${TARGET_DIR}/${BINARY_DIR}
- @echo "[Action] mkdir target and bin directory"
- @CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o
${TARGET_DIR}/${BINARY_DIR}/${BINARY} .
+ @mkdir -p ${BUILD_DIR}/${BINARY_DIR}
+ @echo "[Action] mkdir build and bin directory"
+ @CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -o
${BUILD_DIR}/${BINARY_DIR}/${BINARY} .
@echo "[Action] build binary"
- @cp conf.yaml ${TARGET_DIR}/${BINARY_DIR}
+ @cp conf.yaml ${BUILD_DIR}/${BINARY_DIR}
@echo "[Action] copy binary and conf file to binary directory"
- @tar -zcvf ${TARGET_DIR}/${BINARY_DIR}.tar.gz -C ${TARGET_DIR}
${BINARY_DIR}
- @echo "[Action] generate binary package:
${TARGET_DIR}/${BINARY_DIR}.tar.gz"
+ @tar -zcvf ${BUILD_DIR}/${BINARY_DIR}.tar.gz -C ${BUILD_DIR}
${BINARY_DIR}
+ @echo "[Action] generate binary package:
${BUILD_DIR}/${BINARY_DIR}.tar.gz"
clean:
- @if [ -d "${TARGET_DIR}" ] ; then rm -rf ${TARGET_DIR} && echo
"[Action] cleaned target directory" ; fi
+ @if [ -d "${BUILD_DIR}" ] ; then rm -rf ${BUILD_DIR} && echo "[Action]
cleaned build directory" ; fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]