Skip to content

Fix iterative builds#170

Open
ngie-eign wants to merge 4 commits intommatuska:masterfrom
ngie-eign:fix-iterative-builds
Open

Fix iterative builds#170
ngie-eign wants to merge 4 commits intommatuska:masterfrom
ngie-eign:fix-iterative-builds

Conversation

@ngie-eign
Copy link
Copy Markdown
Contributor

@ngie-eign ngie-eign commented Jan 4, 2026

Core Change

Prior to this change, certain build artifacts like IMAGE, would not be
rebuilt if the inputs to the IMAGE had changed and would not be
removed with the make clean target.

This change moves from hardcoded sentinels associated with .PHONY
targets, like image, away from the build artifacts they produce,
towards sentinel files, such as ${WRKDIR}/.image_done.

This change ensures that running make clean results in a newly
produced image each time the sentinel is removed.

This common logic was replicated to the rest of the high-level targets,
e.g., cd, gce, etc.

Ancillary commits

  • Clean up trailing whitespace.
  • Replace echo -n with printf for portability reasons.
  • Leverage special variable .TARGET in lieu of hardcoded equivalents when possible.

@ngie-eign ngie-eign force-pushed the fix-iterative-builds branch from d24420d to 3b4501a Compare January 5, 2026 06:59
@ngie-eign ngie-eign force-pushed the fix-iterative-builds branch 2 times, most recently from b914f27 to 8dfecda Compare January 25, 2026 02:19
@ngie-eign ngie-eign force-pushed the fix-iterative-builds branch from 8dfecda to 9bff8b4 Compare January 25, 2026 08:33
No functional change intended.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
`printf` is more portable than `echo -n` for scenarios where one wants
to print out a line without a trailing newline character.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
@ngie-eign ngie-eign force-pushed the fix-iterative-builds branch from 9bff8b4 to 4efb579 Compare February 3, 2026 08:24
@ngie-eign ngie-eign marked this pull request as ready for review February 3, 2026 08:24
Change all hardcoded references to the special target, `.TARGET`. This
avoids the need for dealing with hardcoded targets and allows them to
be changed more easily.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Prior to this change, certain build artifacts like `IMAGE`, would not be
rebuilt if the inputs to the `IMAGE` had changed and would not be
removed with the `make clean` target.

This change moves from hardcoded sentinels associated with .PHONY
targets, like `image`, away from the build artifacts they produce,
towards sentinel files, such as `${WRKDIR}/.image_done`.

This change ensures that running `make clean` results in a newly
produced image each time the sentinel is removed.

This common logic was replicated to the rest of the high-level targets,
e.g., `cd`, `gce`, etc.

Add `NO_PACKAGES` support while here. While I generally commit these
things separately, it was easier to bind the two changes together due to
the overlap.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
@ngie-eign ngie-eign force-pushed the fix-iterative-builds branch from 4efb579 to 7e0926a Compare February 3, 2026 08:31
Copy link
Copy Markdown
Contributor Author

@ngie-eign ngie-eign left a comment

Choose a reason for hiding this comment

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

@mmatuska : this is ready for review when you have a chance to look at it.

@mmatuska
Copy link
Copy Markdown
Owner

Sorry, I have been quite busy lately, I will check it next week.

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