Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: make benchmark/napi all prereq order-only #23951

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,20 +308,20 @@ 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/Release/binding.node: all \
benchmark/napi/function_call/build/Release/binding.node: \
benchmark/napi/function_call/napi_binding.c \
benchmark/napi/function_call/binding.cc \
benchmark/napi/function_call/binding.gyp
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
benchmark/napi/function_call/binding.gyp | all
@$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general rule I prefer not to silence make commands without an escape hatch via V=1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe if we make a rule for binding.gyp files we could catch two birds. (1) get it to echo iff V=1 and DRY the code.

Copy link
Contributor

@refack refack Oct 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

quiet_cmd_node_gyp = NODE-GYP($(TOOLSET)) $@
cmd_node_gyp = $(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild --python="$(PYTHON)" --nodedir="$(shell pwd)" --directory="$(abspath $(dir $(dir $(dir $@))))"

$(obj).$(TOOLSET)/binding.node: $(obj).$(TOOLSET)/binding.gyp FORCE_DO_CMD
	@$(call do_cmd,node_gyp,1)

Derived for the GYP generated /out/MakeFile

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was not intended to be about silencing the command, but not having this recipe executed every time. I added the @ by mistake. I'll update shortly, thanks.

--python="$(PYTHON)" \
--directory="$(shell pwd)/benchmark/napi/function_call" \
--nodedir="$(shell pwd)"

benchmark/napi/function_args/build/Release/binding.node: all \
benchmark/napi/function_args/build/Release/binding.node: \
benchmark/napi/function_args/napi_binding.c \
benchmark/napi/function_args/binding.cc \
benchmark/napi/function_args/binding.gyp
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
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)"
Expand Down