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

Add debug_and_release to use separate build dirs #3299

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

softins
Copy link
Member

@softins softins commented Jun 22, 2024

Short description of changes
Adds the debug_and_release option to the CONFIG in Jamulus.pro. This tells qmake to generate separate Makefiles for Debug and Release, each using a separate sub-directory (debug/ and release/ respectively) for build-generated files such as *.o and others, instead of building them in the project root.

The user can then invoke make or make release (the default) to build a release version, or make debug (explicitly) to build a debug version.

This debug_and_release option was already the default for Windows builds, but not for other architectures.

It was necessary also to change mac/deploy_mac.sh to search in Makefile.Release instead of Makefile when looking for the value of QMAKE_TARGET.

CHANGELOG: Build: Place build files in separate directories instead of project root.

Context: Fixes an issue?
Fixes #3092

Does this change need documentation? What needs to be documented and how?
Maybe in compilation instructions, if there are any parts that would need to change as a result. Maybe not.

Status of this Pull Request
Ready to test

What is missing until this pull request can be merged?
Review and test

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

@softins softins added this to the Release 3.11.0 milestone Jun 23, 2024
@ann0see
Copy link
Member

ann0see commented Jun 23, 2024

Thanks. This is very nice. Builds on Debian. The old files in the root of a build don't get removed with a make clean, but that's not too bad.
Yes, the COMPILING.md may need a small hint how to build debug.

@softins
Copy link
Member Author

softins commented Jun 23, 2024

The old files in the root of a build don't get removed with a make clean, but that's not too bad.

Can always switch back to main, then do a make distclean, and then switch back to this branch.

@ann0see
Copy link
Member

ann0see commented Jun 24, 2024

Approving and tagging needs documentation

@ann0see ann0see added the needs documentation PRs requiring documentation changes or additions label Jun 24, 2024
@pljones
Copy link
Collaborator

pljones commented Jun 25, 2024

What about .gitignore - does that need updating to ignore the subdirs?

What about make distclean - does that remove both directories?

@pljones
Copy link
Collaborator

pljones commented Jun 25, 2024

Also, as COMPILING.md is in jamulussoftware/jamulus, updating it should be part of this change.

@softins
Copy link
Member Author

softins commented Jun 25, 2024

What about .gitignore - does that need updating to ignore the subdirs?

Good catch. I've checked the build trees I saved from the CI (see my commit b047958 to see how I did so in my branch debug-and-release-test), and added a few build directories to .gitignore that were not there before.

What about make distclean - does that remove both directories?

I can't test that, but we don't generate the actions for make distclean; qmake does that itself, so I hope it gets it right!

It may be that it empties the build directories but doesn't remove them. Or maybe it does; I'm not sure.

@softins
Copy link
Member Author

softins commented Jun 25, 2024

Also, as COMPILING.md is in jamulussoftware/jamulus, updating it should be part of this change.

Just read through it, and can't see anything that needs to change as a result of this PR. Could possibly add a brief note about make release vs make debug, but make already defaults to make release, so the compilation instructions should still be valid anyway.

I'm not sure what debugging features make debug gives you anyway, so couldn't yet say anything useful about it, only that the option exists.

@softins softins self-assigned this Jun 25, 2024
Copy link
Collaborator

@pljones pljones left a comment

Choose a reason for hiding this comment

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

The MacOS changes make me wonder why we do what's done but if it's needed and works, I suppose it's okay.

@softins softins merged commit 784d7b7 into jamulussoftware:main Jun 26, 2024
15 checks passed
@softins softins deleted the debug-and-release branch June 26, 2024 22:24
@pljones pljones added the tooling Changes to the automated build system label Jul 13, 2024
@pljones pljones mentioned this pull request Jul 22, 2024
60 tasks
@pljones pljones removed the needs documentation PRs requiring documentation changes or additions label Aug 4, 2024
@pljones
Copy link
Collaborator

pljones commented Aug 4, 2024

#3322 raised for documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Changes to the automated build system
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Place build generated files in separate folder
3 participants