diff --git a/Makefile b/Makefile index 87afe29b46828f..53dea85eb8f553 100644 --- a/Makefile +++ b/Makefile @@ -347,24 +347,6 @@ test-valgrind: all test-check-deopts: all $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) --check-deopts parallel sequential -benchmark/napi/function_call/build/$(BUILDTYPE)/binding.node: \ - benchmark/napi/function_call/napi_binding.c \ - benchmark/napi/function_call/binding.cc \ - benchmark/napi/function_call/binding.gyp | all - $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ - --python="$(PYTHON)" \ - --directory="$(shell pwd)/benchmark/napi/function_call" \ - --nodedir="$(shell pwd)" - -benchmark/napi/function_args/build/$(BUILDTYPE)/binding.node: \ - benchmark/napi/function_args/napi_binding.c \ - benchmark/napi/function_args/binding.cc \ - benchmark/napi/function_args/binding.gyp | all - $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ - --python="$(PYTHON)" \ - --directory="$(shell pwd)/benchmark/napi/function_args" \ - --nodedir="$(shell pwd)" - DOCBUILDSTAMP_PREREQS = tools/doc/addon-verify.js doc/api/addons.md ifeq ($(OSTYPE),aix) @@ -470,6 +452,17 @@ test/node-api/.buildstamp: $(ADDONS_PREREQS) \ # TODO(bnoordhuis) Force rebuild after gyp or node-gyp update. build-node-api-tests: | $(NODE_EXE) test/node-api/.buildstamp +BENCHMARK_NAPI_BINDING_GYPS := $(wildcard benchmark/napi/*/binding.gyp) + +BENCHMARK_NAPI_BINDING_SOURCES := \ + $(wildcard benchmark/napi/*/*.c) \ + $(wildcard benchmark/napi/*/*.cc) \ + $(wildcard benchmark/napi/*/*.h) + +benchmark/napi/.buildstamp: $(ADDONS_PREREQS) \ + $(BENCHMARK_NAPI_BINDING_GYPS) $(BENCHMARK_NAPI_BINDING_SOURCES) + @$(call run_build_addons,"$$PWD/benchmark/napi",$@) + .PHONY: clear-stalled clear-stalled: @echo "Clean up any leftover processes but don't error if found." @@ -1163,13 +1156,12 @@ bench: bench-addons-build # Build required addons for benchmark before running it. .PHONY: bench-addons-build -bench-addons-build: benchmark/napi/function_call/build/$(BUILDTYPE)/binding.node \ - benchmark/napi/function_args/build/$(BUILDTYPE)/binding.node +bench-addons-build: | $(NODE_EXE) benchmark/napi/.buildstamp .PHONY: bench-addons-clean bench-addons-clean: - $(RM) -r benchmark/napi/function_call/build - $(RM) -r benchmark/napi/function_args/build + $(RM) -r benchmark/napi/*/build + $(RM) benchmark/napi/.buildstamp .PHONY: lint-md-rollup lint-md-rollup: diff --git a/benchmark/napi/ref/.gitignore b/benchmark/napi/ref/.gitignore new file mode 100644 index 00000000000000..567609b1234a9b --- /dev/null +++ b/benchmark/napi/ref/.gitignore @@ -0,0 +1 @@ +build/