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

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Oct 29, 2018

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.

There is some code duplication in these two targets but I though it might make reviewing difficult so I've left this for a follow up commit/pull request.

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

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.
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Oct 29, 2018
@danbev
Copy link
Contributor Author

danbev commented Oct 29, 2018

Makefile Outdated
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.

@refack
Copy link
Contributor

refack commented Oct 29, 2018

For build file related changes please ping @nodejs/build-files, thank you.

@danbev
Copy link
Contributor Author

danbev commented Nov 1, 2018

@danbev
Copy link
Contributor Author

danbev commented Nov 1, 2018

Landed in 98819df.

@danbev danbev closed this Nov 1, 2018
@danbev danbev deleted the benchmark-napi-order-only branch November 1, 2018 14:32
danbev added a commit that referenced this pull request Nov 1, 2018
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.

PR-URL: #23951
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
targos pushed a commit that referenced this pull request Nov 2, 2018
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.

PR-URL: #23951
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 27, 2018
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.

PR-URL: #23951
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
@codebytere codebytere mentioned this pull request Nov 27, 2018
rvagg pushed a commit that referenced this pull request Nov 28, 2018
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.

PR-URL: #23951
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 29, 2018
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.

PR-URL: #23951
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
@codebytere codebytere mentioned this pull request Nov 29, 2018
MylesBorins pushed a commit that referenced this pull request Dec 3, 2018
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.

PR-URL: #23951
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants