Skip to content

Commit 8e6f607

Browse files
committed
SWPROT-8953: build: Add run rule
Origin: SiliconLabsSoftware#41 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent 80e83f9 commit 8e6f607

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

helper.mk

+10-2
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ cmake_options+=-DCARGO_TARGET_TRIPLE="${CARGO_TARGET_TRIPLE}"
9292
export CMAKE_TARGET_TRIPLE
9393
endif
9494

95+
run_file?=${build_dir}/applications/zpc/zpc
9596

9697
help: ./helper.mk
9798
@echo "# ${project}: ${url}"
9899
@echo "#"
99100
@echo "# Usage:"
100101
@echo "# ${<D}/${<F} setup # To setup developer system (once)"
101102
@echo "# ${<D}/${<F} VERBOSE=1 # Default build tasks verbosely (depends on setup)"
102-
@echo "# ${<D}/${<F} # For more info"
103+
@echo "# ${<D}/${<F} help/all # For more info"
103104
@echo "#"
104105

105106
help/all: README.md NEWS.md
@@ -234,6 +235,9 @@ all: ${build_dir}/CMakeCache.txt
234235
${build_dir}/%: all
235236
file -E "$@"
236237

238+
${build_dir}: ${build_dir}/CMakeCache.txt
239+
file -E "$<"
240+
237241
test: ${build_dir}
238242
ctest --test-dir ${<}/${project_test_dir}
239243

@@ -260,6 +264,10 @@ prepare: git/prepare
260264
all/default: configure prepare all test dist
261265
@date -u
262266

267+
run_args?=--help
268+
run:
269+
file -E ${run_file}
270+
${run_file} ${run_args}
263271

264272
### @rootfs is faster than docker for env check
265273

@@ -312,7 +320,7 @@ docker_url?=${url}.git\#${docker_branch}
312320
docker/%: Dockerfile
313321
time docker run "${project}:latest" -C "${docker_workdir}" "${@F}"
314322

315-
test/docker: distclean prepare/docker docker/help docker/test
323+
test/docker: distclean prepare/docker docker/help docker/test docker/run
316324
@echo "# ${project}: log: $@: done: $^"
317325

318326
test/docker/build:

0 commit comments

Comments
 (0)