Skip to content

Remove Make target cycle between build command and build directory #3

Description

@c-wri

Observed

Canonical native validation emits warnings such as:

make: Circular build/clipreg.o <- build dependency dropped.
make: Circular build/ext-data-control-v1-protocol.o <- build dependency dropped.
make: Circular build/cosmic-toplevel-info-unstable-v1-protocol.o <- build dependency dropped.

Root cause

Makefile uses BUILD := build, defines the public operator target build: $(BUILD)/clipreg, and also uses $(BUILD) as an order-only directory prerequisite. The name build therefore represents both the public build target and the generated-output directory, creating a dependency cycle that GNU Make currently breaks by dropping the circular edge.

Desired invariant

Canonical build output should be warning-clean and dependency ordering should be explicit rather than relying on Make's cycle recovery.

Acceptance

  • Separate the public build target from generated-directory creation (for example with a directory stamp or non-conflicting internal target).
  • make clean build completes without circular-dependency warnings.
  • make check remains green and leaves tracked state clean.
  • Do not mix this foundation cleanup into unrelated runtime/liveness PRs.

This is not currently a v0.2.0-rc.1 blocker unless investigation exposes a correctness dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:deploymentInstall, upgrade, service, udev, migration, or packagingbugSomething is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions