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-system: Allow out of tree BUILD_DIR #19600

Merged
merged 1 commit into from
May 17, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented May 16, 2023

Contribution description

  • Replace all users of $(RIOTBASE)/build with the already present $(BUILD_DIR) variable
  • Replace all users of $(BUILD_DIR)/pkg with the already present $(PKGDIRBASE) variable
  • Create a CACHEDIR.TAG file in the $(BUILD_DIR)

Testing procedure

  • Green CI
  • BUILD_DIR=~/.cache/RIOT make -C tests/pkg/foobar should work and foobar should be checked out into ~/.cache/RIOT rather than into the $(RIOTBASE)/build
  • A CACHEDIR.TAG file should be created in that directory

Issues/PRs references

None

- Replace all users of `$(RIOTBASE)/build` with the already present
  `$(BUILD_DIR)` variable
- Replace all users of `$(BUILD_DIR)/pkg` with the already present
  `$(PKGDIRBASE)` variable
- Create a `CACHEDIR.TAG` file in the `$(BUILD_DIR)`
@maribu maribu added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 16, 2023
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools Platform: ARM Platform: This PR/issue effects ARM-based platforms labels May 16, 2023
@riot-ci
Copy link

riot-ci commented May 16, 2023

Murdock results

✔️ PASSED

5457014 build-system: Allow out of tree BUILD_DIR

Success Failures Total Runtime
6931 0 6931 10m:22s

Artifacts

Copy link
Member

@chrysn chrysn left a comment

Choose a reason for hiding this comment

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

LGTM, works as advertised.

Note there's a typo (BUILDDIR instead of BUILD_DIR) in the PR description; not sure whether these are still committed in full text.

To those unfamiliar with the build system it may be surprising that BUILD_DIR is only used for pkg clones (while the actual building still happens in bin/ as usual); that behavior is not changed here.

@maribu
Copy link
Member Author

maribu commented May 16, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented May 17, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 1c1199c into RIOT-OS:master May 17, 2023
@maribu maribu deleted the buildsystem/build_dir branch May 24, 2023 19:09
@maribu
Copy link
Member Author

maribu commented May 24, 2023

Thx :)

@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants