Skip to content

Core package Makefiles declare no phony targets, so a same-named file can silently skip a build step #3709

Open

Description

The four Makefiles under packages/core/ define their own targets and declare none of them phony. installer, platform, flux-aio and testing include only hack/common-envs.mk, which defines no targets, so nothing declares anything on their behalf either. All four are reached from the root Makefile build: target.

The failure is quiet. image: in the installer reads image: pre-checks image-operator image-packages chart, and chart: has a recipe and no prerequisites. Put a file or directory named chart next to that Makefile and make treats the target as up to date, skips the helm packaging step and exits 0 — a green build that packaged nothing. The same shape covers show, apply, diff, delete, help, test and unprotect across the four files.

Nothing collides today. No file or directory named after any of those targets exists under packages/core/, so this is preventive rather than a fix for present breakage.

The remedy is one .PHONY: line per file, naming the targets that file defines. It cannot be done centrally, and that is the point worth recording: hack/common-envs.mk does not define these targets, and naming a target in .PHONY that the including file does not define creates it as an empty target, turning a missing rule from No rule to make target (exit 2) into Nothing to be done (exit 0). #3353 closes the same class for the 159 package Makefiles that include hack/package.mk, and stops at the targets that file actually defines for exactly this reason.

Activity

  1. added
    kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debt
    area/buildIssues or PRs related to image build infrastructure, multi-arch support
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildIssues or PRs related to image build infrastructure, multi-arch supportkind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions