Skip to content

Add target groups and external static libraries - #5

Merged
anemitz merged 4 commits into
masterfrom
target-groups-d51f
Aug 25, 2026
Merged

anemitz merged 4 commits into
masterfrom
target-groups-d51f

Conversation

@anemitz

@anemitz anemitz commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner

This PR adds TARGET_GROUPS so selected binaries, shared libraries, and tests can share static-archive prerequisites without repeating _STATICLIBS or relinking unrelated outputs. It also adds EXTERNAL_STATICLIBS so a linked archive path can be refreshed from the owning component without copying producer sources.

  • Groups concatenate after per-target _STATICLIBS and remain explicit prerequisites of only the named outputs
  • External names are the owner's STATICLIBS targets; _PATH and _DIR emit a phony recurse only when this Makefile links that path and does not itself build the library
  • Parent SUBDIRS still need an explicit producer-before-consumer order for make -j; concurrent standalone consumer builds that share a stale archive are out of contract
  • Pick this up by updating the vendored Makefile.inc after merge

Validation ran make -C tests host.

Fixes #4

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 25, 2026 01:03
Let a named set of binaries, shared libraries, or tests share archive
prerequisites without repeating _STATICLIBS or relinking unrelated outputs.

Co-authored-by: Anthony N <anemitz@users.noreply.github.com>
Declare an owning directory for a static-library target so consumers can
refresh a linked archive path without copying producer sources or a
project-specific recurse rule.

Co-authored-by: Anthony N <anemitz@users.noreply.github.com>
@cursor cursor Bot changed the title Add static-library target groups Add target groups and external static libraries Aug 25, 2026
cursoragent and others added 2 commits August 25, 2026 03:02
_DIR must use recursive assignment when it refers to PROJECT_ROOT, the
same way _PATH refers to PKGDIR.

Co-authored-by: Anthony N <anemitz@users.noreply.github.com>
Catch := of _PATH before PKGDIR exists, document concurrent standalone
consumer races, and assert an unchanged archive does not relink.

Co-authored-by: Anthony N <anemitz@users.noreply.github.com>
@anemitz
anemitz marked this pull request as ready for review August 25, 2026 03:52
@anemitz
anemitz merged commit 475f4fa into master Aug 25, 2026
4 checks passed
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.

Support static libraries for target groups

2 participants