Skip to content

fix(scripts): make .PHONY in package.mk an actual declaration - #4

Open
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
mainfrom
fix/package-mk-phony-declaration
Open

fix(scripts): make .PHONY in package.mk an actual declaration#4
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
mainfrom
fix/package-mk-phony-declaration

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Line 2 of scripts/package.mk is .PHONY=help show diff apply delete update image. That is a variable assignment, so make defines a variable called .PHONY that nothing reads, and none of those targets is phony. Line 1 is .DEFAULT_GOAL=help, a real variable where = is correct, which is probably why this went unnoticed.

I measured it both ways in a scratch checkout. With a file named help sitting next to packages/apps/minecraft-server/Makefile, make help on current main prints make: 'help' is up to date. and exits 0 without running the recipe. With the colon in place the recipe runs. Nothing in the repository is named after a target today, so this is latent rather than currently broken.

I changed the list as well. scripts/package.mk defines help show apply diff suspend resume delete check clean, so suspend, resume, check and clean were missing. check is the one that matters most, since it is the prerequisite that keeps show, diff, apply and delete rebuilding. Going the other way, update and image are not defined here at all, neither in scripts/package.mk nor in any of the three package Makefiles. Naming an undefined target in .PHONY creates it empty, so make image would print "Nothing to be done" and exit 0 instead of failing with "No rule to make target". Better to leave them out.

One note on provenance: this file is a byte-for-byte copy of hack/package.mk in cozystack/cozystack, where the same line is being fixed in cozystack/cozystack#3353. The two are identical today, so that change splits them. The target list over there is not automatically right here, and the one in this PR comes from what this repository's own Makefiles define.

Summary by CodeRabbit

  • Chores
    • Replaced the obsolete update and image build commands with suspend, resume, and check commands.
    • Updated available command declarations to reflect the current build workflow.

Line 2 used `.PHONY=`, which is a variable assignment. Make defined a
variable that nothing reads, and none of the listed targets was phony.
The special target needs a colon. Line 1 is `.DEFAULT_GOAL=help`, a
real variable where `=` is correct, which is likely why this went
unnoticed.

Corrected the list to what this file actually defines. `suspend`,
`resume`, `check` and `clean` were missing; `check` is the prerequisite
that keeps `show`, `diff`, `apply` and `delete` rebuilding. Dropped
`update` and `image`, which are defined neither here nor in any package
Makefile: naming an undefined target in `.PHONY` creates it empty, so
`make image` would report nothing to be done and exit 0 instead of
failing with "No rule to make target".

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 70c97709-6d2b-46fe-a37f-63e19d2b60a0

📥 Commits

Reviewing files that changed from the base of the PR and between 1e778fb and e92faec.

📒 Files selected for processing (1)
  • scripts/package.mk

📝 Walkthrough

Walkthrough

The package Makefile updates its .PHONY declaration. It removes update and image, then adds suspend, resume, and check.

Changes

Package targets

Layer / File(s) Summary
Update phony target declarations
scripts/package.mk
The .PHONY declaration removes update and image and adds suspend, resume, and check.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the fix to the .PHONY declaration in scripts/package.mk, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/package-mk-phony-declaration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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