Skip to content
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
Next Next commit
build: make benchmark/napi all prereq order-only
This commit makes the all prerequisites order-only to prevent this
target's rules to be executed every time which is currently the case as
the all target is a phony target and will be executed every time.
  • Loading branch information
danbev committed Oct 29, 2018
commit 67002e08362dceb10ef10a7ccfbe1bff11a199c3
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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