Skip to content

Commit d2123e9

Browse files
committed
Adding new build targets: 'bench-addons' & 'bench-addons-clean'.
With these two, it will be easier to manage the dependencies among targets and easier to build/clean the addons which are being used in benchmarking.
1 parent 19bc893 commit d2123e9

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ clean: ## Remove build artifacts.
141141
$(RM) -r test/tmp*
142142
$(RM) -r test/.tmp*
143143
$(MAKE) test-addons-clean
144+
$(MAKE) bench-addons-clean
144145

145146
.PHONY: distclean
146147
distclean:
@@ -1045,13 +1046,23 @@ ifeq ($(XZ), 0)
10451046
endif
10461047

10471048
.PHONY: bench-all
1048-
bench-all:
1049+
bench-all: bench-addons-build
10491050
@echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
10501051

10511052
.PHONY: bench
1052-
bench:
1053+
bench: bench-addons-build
10531054
@echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
10541055

1056+
# Build required addons for benchmark before running it.
1057+
.PHONY: bench-addons-build
1058+
bench-addons-build: benchmark/napi/function_call/build/Release/binding.node \
1059+
benchmark/napi/function_args/build/Release/binding.node
1060+
1061+
.PHONY: bench-addons-clean
1062+
bench-addons-clean:
1063+
$(RM) -r benchmark/napi/function_call/build
1064+
$(RM) -r benchmark/napi/function_args/build
1065+
10551066
.PHONY: lint-md-clean
10561067
lint-md-clean:
10571068
$(RM) -r tools/remark-cli/node_modules

0 commit comments

Comments
 (0)