Skip to content

Fix include_rules to include all Tuprules.tup root-to-leaf#5

Merged
typeless merged 2 commits intomainfrom
fix/include-rules-nested
Feb 10, 2026
Merged

Fix include_rules to include all Tuprules.tup root-to-leaf#5
typeless merged 2 commits intomainfrom
fix/include-rules-nested

Conversation

@typeless
Copy link
Owner

Summary

  • include_rules now includes every Tuprules.tup from the project root down to the current directory (root-first order), matching tup semantics. Previously only the nearest file was found.
  • Refactors find_tuprules_filefind_tuprules_files (returns vector), extracts include_single_file helper from process_include
  • Documents the self-contained library convention (§7.6) that this enables: per-library Tuprules.tup with ?= defaults layered on top of a root Tuprules.tup

Test plan

  • New E2E test include_rules_nested: root sets CC=gcc, sub sets CC?=clang — verifies root wins, sub contributes its own vars
  • All 327 tests pass (142 E2E, no regressions)
  • make format clean
  • make tidy — no new warnings

🤖 Generated with Claude Code

typeless and others added 2 commits February 10, 2026 13:11
include_rules now includes every Tuprules.tup from the project root
down to the current directory in root-first order, matching tup
semantics. Previously only the nearest file was found, preventing
per-library Tuprules.tup files from layering on top of a root file.

Refactors builder.cpp: find_tuprules_file -> find_tuprules_files
(returns vector), extracts include_single_file helper from
process_include, loops over all found files for the is_rules path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Describes the pattern for composable multi-library builds: root
Tuprules.tup sets layout, per-library Tuprules.tup provides ?=
defaults, prefixed DIR vars for cross-references, unprefixed
CFLAGS/\!cc within each subtree. Also clarifies include_rules
semantics (all Tuprules.tup from root to current dir, root-first).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@typeless typeless force-pushed the fix/include-rules-nested branch from 6aa2104 to 2a8d3e6 Compare February 10, 2026 05:12
@typeless typeless merged commit 010eddd into main Feb 10, 2026
4 checks passed
@typeless typeless deleted the fix/include-rules-nested branch February 10, 2026 10:09
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