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

Makefile: Remove unnecessary .PHONY entries #802

Merged
merged 1 commit into from
May 11, 2017

Conversation

wking
Copy link
Contributor

@wking wking commented May 11, 2017

The only .PHONY entry we need is for schema/validate, since that's a real file but we haven't told Make about its real dependencies (which involve complicated Go lookups). I'm personally in favor of using .PHONY for all targets that aren't on-disk files, because it hints to readers that the rule is not generating a file at the target. But there has been resistance to adding .PHONY entries to all such cases (e.g. #791), so this commit brings us around to a internally-consistent “only use .PHONY when you always need it” position.

That means that, for example, users who create files named clean will turn clean the target into a no-op, but runtime-spec maintainers are ok with that.

The only .PHONY entry we *need* is for schema/validate, since that's a
real file but we haven't told Make about its real dependencies (which
involve complicated Go lookups).  I'm personally in favor of using
.PHONY for all targets that aren't on-disk files, because it hints to
readers that the rule is not generating a file at the target.  But
there has been resistance to adding .PHONY entries to all such cases
(e.g. [1,2]), so this commit brings us around to a
internally-consistent "only use .PHONY when you always need it"
position.

That means that, for example, users who create files named 'clean'
will turn 'clean' the target into a no-op, but runtime-spec
maintainers are ok with that.

[1]: opencontainers#791 (comment)
[2]: opencontainers#791 (comment)

Signed-off-by: W. Trevor King <[email protected]>
@tianon
Copy link
Member

tianon commented May 11, 2017

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Member

crosbymichael commented May 11, 2017

LGTM

Approved with PullApprove

@crosbymichael crosbymichael merged commit 02a936a into opencontainers:master May 11, 2017
@wking wking deleted the minimal-phony branch May 11, 2017 08:36
@vbatts vbatts mentioned this pull request Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants