Skip to content

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