Skip to content

macx: fix make distclean to remove Xcode-generator artifacts - #273

Open
ann0see wants to merge 1 commit into
mainfrom
fix/macx-distclean
Open

macx: fix make distclean to remove Xcode-generator artifacts#273
ann0see wants to merge 1 commit into
mainfrom
fix/macx-distclean

Conversation

@ann0see

@ann0see ann0see commented Jul 15, 2026

Copy link
Copy Markdown
Owner

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

  • 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

Comment thread Jamulus.pro Outdated
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.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Redundant

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.
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.

1 participant