Commit 5affd5f
committed
Build bundled-gem extensions for docs targets
After b5e6e0a (Use rbs-integrated RDoc), tool/rdoc-srcdir does
require 'rdoc/rdoc' which activates rdoc-7.2.0 and its new
add_dependency 'rbs', '>= 4.0.0'. RubyGems then needs rbs's gemspec
in .bundle/specifications/ and its C extension built. ext/extmk.rb
already handles both via each per-gem Makefile (all -> install ->
gemspec copies .bundled.rbs-*.gemspec into specifications/, and the
TARGET_SO recipe writes gem.build_complete) -- but only if
ext/configure-ext.mk has seen .bundle/gems/ populated when its
template's Dir.glob(".bundle/gems/**/extconf.rb") runs.
On a clean tree, ext/configure-ext.mk regenerates before
prepare-gems extracts anything, so its template glob finds nothing,
exts.mk lacks rules for bundled-gem extensions, the rbs C extension
never compiles, and RubyGems aborts with "Ignoring rbs-4.0.2 because
its extensions are not built."
Add prepare-gems as a prereq of ext/configure-ext.mk, scoped via
MAKECMDGOALS to docs goals only (rdoc, rdoc:%, html, html-server,
rdoc-coverage, undocumented). Plain `make` is untouched, so an
offline-fresh-checkout build doesn't reach prepare-gems -> update-gems.
Also fix tool/update-deps: with the new dep, `make -p all` now
includes rules from inside .bundle/gems/<gem>/ext/<ext>/, where make
prints relative targets like `bigdecimal.o:` whose curdir is under
.bundle/. The existing filter checked the raw target string, missing
these; move the check onto `dir + target` so the full path is what's
inspected. Bundled gems own their depend files, so skipping them here
matches the intent of the original filter.
https://claude.ai/code/session_01YRoRyZPew2LtN6u6BX8bzx1 parent b5e6e0a commit 5affd5f
2 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
361 | 376 | | |
362 | 377 | | |
363 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
332 | 331 | | |
333 | 332 | | |
334 | 333 | | |
335 | | - | |
336 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
0 commit comments