macx: fix make distclean to remove Xcode-generator artifacts - #273
Open
ann0see wants to merge 1 commit into
Open
macx: fix make distclean to remove Xcode-generator artifacts#273ann0see wants to merge 1 commit into
ann0see wants to merge 1 commit into
Conversation
ann0see
commented
Jul 15, 2026
Comment on lines
+1199
to
+1203
| # The Xcode generator (macx-xcode) emits moc/ui/rcc output and the Xcode | ||
| # project into the project root (not under release/), so the default | ||
| # make-distclean rules miss them. List them so `make distclean` cleans up | ||
| # after a spec switch and does not reuse stale generated files from a | ||
| # previous build. |
The Xcode generator (macx-xcode) emits moc/ui/rcc output into the project root (not under release/), so the default distclean rules miss them. After switching specs, stale generated files can cause build breakage (e.g. Qt5-generated mocs breaking Qt6 builds). List the generated files in QMAKE_DISTCLEAN so make distclean removes them. Guard with !macx-xcode since the Xcode generator misinterprets the globs as build inputs.
ann0see
force-pushed
the
fix/macx-distclean
branch
from
July 15, 2026 22:22
247f89e to
60a4829
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Xcode generator (macx-xcode) emits moc/ui/rcc output and the Xcode project into the project root (not under release/), so the default distclean rules miss them. After switching specs, stale generated files can cause build breakage.
List the generated files and Xcode project directories in QMAKE_DISTCLEAN so make distclean removes them regardless of which macOS spec created them. Use a recursive delete so the directories are removed as well (QMAKE_DISTCLEAN would otherwise only rm -f).
Short description of changes
CHANGELOG:
Context: Fixes an issue?
Does this change need documentation? What needs to be documented and how?
Status of this Pull Request
What is missing until this pull request can be merged?
Checklist