-
Notifications
You must be signed in to change notification settings - Fork 51
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
fix: default goal in makefile and add goal for unit tests #475
Conversation
841e7e8
to
b67b884
Compare
@@ -15,10 +15,14 @@ OSD_E2E_TEST_HARNESS_IMG=$(IMAGE_BASE)-test-harness:$(VERSION) | |||
OSD_E2E_TEST_HARNESS_IMG_LATEST=$(IMAGE_BASE)-test-harness:latest | |||
|
|||
# running `make` builds the operator (default target) | |||
all: operator | |||
.DEFAULT_GOAL := operator |
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.
Afaiu the .DEFaULT_GOAL
variable is intended for more complex use cases. The make docs say
The .DEFAULT_GOAL variable allows you to discover the current default goal, restart the default goal selection algorithm by clearing its value, or to explicitly set the default goal.
I don't a benefit over just letting make pick the first target as the default.
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.
The advantage of .DEFAULT_GOAL
is that you explicitly set the default goal instead of relying on the structure of the Makefile to define the default goal. For example, in this Makefile we include
another file above this declaration, which already defines some goals of which one becomes the default goal.
We can either move the goal we want as default further up in the file (above the include
, in this case) or define what we want explicitly (which is what I opted for).
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.
Fair point, I didn't think of the import.
20212bf
to
e0b1ff4
Compare
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jan--f, xperimental The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Three changes, but all in the Makefile:
I can split this up into separate PRs, if you like.