Skip to content

Document TARGET naming mechanisms in Jamulus.pro - #3850

Open
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:docs-pro-target-naming
Open

Document TARGET naming mechanisms in Jamulus.pro#3850
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:docs-pro-target-naming

Conversation

@mcfnord

@mcfnord mcfnord commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

MY LLM WROTE:

Follow-up to @pljones' review comment on #3799 (#3799 (comment)):

It might be worth documenting in the Jamulus.pro rather than surfacing it to the debian-specific README. Anyone maintaining Jamulus.pro would need to be aware of the intent.

Probably a separate PR, though, at this point.

This is that separate PR. Comment only — no build behaviour changes.

What it documents

The two Debian packages get their binary names by different mechanisms, and nothing in Jamulus.pro said so:

package qmake invocation resulting TARGET
jamulus CONFIG+=noupcasename (linux/debian/rules:34) jamulus
jamulus-headless TARGET=jamulus-headless on the command line (linux/debian/rules:35) jamulus-headless
(neither) plain qmake Jamulus

TARGET is consumed in three places, so a change here is not local:

  • usr/bin/<TARGET> is what debian/jamulus.install and debian/jamulus-headless.install list;
  • it is substituted into Exec= in the generated .desktop files (linux/jamulus.desktop.in:13 is Exec=$$TARGET);
  • it has to keep matching the hardcoded ExecStart=/usr/bin/jamulus-headless in debian/jamulus-headless.service:21.

The part worth knowing

TARGET = jamulus inside the noupcasename block silently overrides a TARGET= passed on the qmake command line. So adding noupcasename to the headless build — which looks like a harmless tidy-up that unifies the two mechanisms — would rename that binary to jamulus, and the failure surfaces as a broken package, not a build error.

How this was checked

Each row of the table above was produced by running qmake and reading TARGET out of the generated Makefile.Release, not by reading the .pro file. The Exec= claim was checked against the generated .desktop files (Exec=jamulus with noupcasename, Exec=Jamulus without). Environment: qmake 3.1 / Qt 5.15.13, Ubuntu, QT_SELECT=qt5 as linux/debian/rules:3 pins.

Not exercised: the macOS server_bundle append at Jamulus.pro:191 (TARGET = $${TARGET}Server), and the precedence rule was confirmed on Qt5 only. Neither affects Debian packaging, but say the word if you want either measured before merge.

The two Debian packages get their binary names by different means: the
desktop build passes CONFIG+=noupcasename, while the headless build
passes TARGET=jamulus-headless on the qmake command line. Nothing in
the file said so, and the interaction is easy to get wrong.

Record where TARGET is consumed (debian/*.install, the generated
.desktop Exec=, and the hardcoded ExecStart= in the headless unit) and
note that the assignment in this block overrides any command-line
TARGET=, so adding noupcasename to the headless build would silently
rename its binary to "jamulus" and break that package.

Comment only; no build behaviour changes.
@pljones

pljones commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

it is substituted into Exec= in the generated .desktop files (linux/jamulus.desktop.in:13 is Exec=$$TARGET);
it has to keep matching the hardcoded ExecStart=/usr/bin/jamulus-headless in debian/jamulus-headless.service:21.

I'm tempted to say both should have TARGET substituted in for consistency.

TARGET = jamulus inside the noupcasename block silently overrides a TARGET= passed on the qmake command line.

I'd say this is a bug. The AutoBuild workflow should pass in the TARGET for both, making it clear it's not the default build behaviour.

That would remove any need for noupcasename in the Jamulus.pro and AutoBuild workflows, I think - and have the added benefit of consistency.

(It would need noting as a breaking change for people cooking their own debs.)

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.

2 participants