-
Notifications
You must be signed in to change notification settings - Fork 550
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
schema: add clean
to Makefile
#774
Conversation
Signed-off-by: zhouhao <[email protected]>
@@ -16,3 +16,6 @@ validate: validate.go | |||
go get -d ./... | |||
go build ./validate.go | |||
|
|||
clean: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also .PHONY
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that is necessary. make clean
can be executed correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that is necessary. `make clean1 can be executed correctly.
So can make validate
, with or without the .PHONY
declaration. .PHONY
keeps the target working even if someone creates a clean
file. And while that is unlikely, I don't see why we shouldn't protect ourselves from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do not add .PHONY
, make validate
can not be repeated, the following error occurs:
make: 'validate' is up to date.
so add the .PHONY
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do not add
.PHONY
,make validate
can not be repeated…
Fair. An example closer to your clean
would be the the clean
entry in the main Makefile
.
Signed-off-by: zhouhao [email protected]