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

build: fix the default target of Makefile #9047

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

satoru-takeuchi
Copy link
Member

Description of your changes:

The current default target of Makefile is "_output/charts".

$ make -d
...
Successfully remade target file '/home/sat/go/src/github.com/rook/rook/_output/charts'.

It's because Makefile first includes "build/makelib/helm.mk", this file defines
some targets, and the first entry is regarded as the default target.

Checklist:

  • [o] Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • [o] Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • [o] Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • [o] Reviewed the developer guide on Submitting a Pull Request
  • [o] Documentation has been updated, if necessary.
  • [o] Unit tests have been added, if necessary.
  • [o] Integration tests have been added, if necessary.
  • [o] Pending release notes updated with breaking and/or notable changes, if necessary.
  • [o] Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • [o] Code generation (make codegen) has been run to update object specifications, if necessary.

The current default target of Makefile is "_output/charts".

```
$ make -d
...
Successfully remade target file '/home/sat/go/src/github.com/rook/rook/_output/charts'.
```

It's because Makefile first includes "build/makelib/helm.mk", this file defines
some targets, and the first entry is regarded as the default target.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure I understand the bug this is fixing and how it manifests but since the build is passing in the CI. Perhaps you could clarify?

@satoru-takeuchi
Copy link
Member Author

I'm not 100% sure I understand the bug this is fixing and how it manifests but since the build is passing in the CI. Perhaps you could clarify?

@leseb In Rook, The make's default target has been expected to be all. And it actually was true because the first target in Makefile is all and make regards the first target as the default. However, However, after Makefile includes build/makelib/helm.mk, the default target was changed by mistake. It's because helm.ml has some targets and the first one (/home/sat/go/src/github.com/rook/rook/_output/charts) was regarded as the new first target.

There are some ways to fix this problem and the simplest one is setting the default target explicitly by setting .DEFAULT_GOAL.

@satoru-takeuchi satoru-takeuchi merged commit 7375679 into rook:master Oct 29, 2021
@satoru-takeuchi satoru-takeuchi deleted the build-fix-the-default-target branch October 29, 2021 01:45
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.

None yet

2 participants