-
Notifications
You must be signed in to change notification settings - Fork 1.5k
build: Makefile #385
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: Makefile #385
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: paulfantom If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
FWIW, I created my own local Makefile to allow me to feed my habit of typing make for a build - so there is a set of people who will find it useful. |
|
The help target is clever. I don't see the need for yet another way to trigger the build though. I'd rather we just stick to scripts since Go and Make really do not get along. |
|
That's why I just wrapped scripts into one Makefile and not used any |
wking
left a comment
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'm fine without a Makefile, but I agree that folks will generally expect something like this, and I don't expect it to be too hard to maintain, so I'm ok going ahead with this PR too.
Makefile
Outdated
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'd rather this be a .PHONY bin/terraform, so the target matches the output, with .PHONY because we aren't declaring the upstream dependencies.
.PHONY: bin/terraform
bin/terraform:
hack/get-terraform.shPretty much everything in here is .PHONY. I'm fine if you want to have a single entry at the end too:
.PHONY: \
bin/openshift-install \
bin/terraform \
help \
etc \
etcThere 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.
For some stupid reason I had .PHONY everywhere and deleted it.
Makefile
Outdated
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.
Same as for the Terraform target, I'd rather this matched the name of the file being created. In this case, it's bin/openshift-install. And once you match, you'll need a .PHONY entry, because we aren't telling make about the Go dependencies.
Makefile
Outdated
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 doesn't mass my personal "utility outweighs complexity" threshold, although other maintainers may feel differently. Can we just do something like this?
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 kinda like it. By writing one thing you automatically get two:
- code comments
- runtime help
So no need to maintain a part of Makefile responsible for help target.
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.
By writing one thing you automatically get two:
- code comments
- runtime help
Runtime help is useful for users who don't read Makefile. I don't think the comment role is important though, especially with a Makefile as short and simple as this.
A hard-coded approach to help is also harder to get wrong (e.g. this, I think?). And you'll have to expand your regexp to allow slashes for bin/terraform.
I also don't know how portable your ANSI color escapes are (e.g. does Windows' stock terminal support them?). I'd rather drop the terminal escapes.
But if you're really committed, I'll /lgtm this approach ;).
Makefile
Outdated
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 should be over ./pkg/.... Otherwise this looks good; why comment it out?
|
Can you also format your commit message properly? Take a look at the git history to see the general format we follow. I would use |
|
Fixed. |
From various places I find it easier to do |
|
Fixed. |
|
Fixed 😄 |
|
Personally, keeping the Makefile in the root makes it seem like the official way to run/build things in installer repo. And i think we have discussed it before that the |
|
@abhinavdahiya and I talked it over in person and we don't think the Makefile is the right way forward. Thank you anyway for your effort. /close |
|
@crawford: Closing this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can I interest you in a Makefile? 😄
This is just something on top of which you could start building.
/CC: @sallyom @wking