284 Commits

Author SHA1 Message Date
Nobuyoshi Nakada
dca417bde7
[Misc #22206] Parse mkdepend options with OptionParser
Replace `-s` globals with explicit command options and standard long
option names. Group source selection under `--scope` and represent
output behavior as a single mode so command-line precedence is clear.

Keep command-line parsing and option dispatch inside `Mkdepend`, and
return command success directly from `Mkdepend.main`.
2026-07-23 00:54:13 +09:00
Nobuyoshi Nakada
7d4461e162
[Misc #22206] Generate dependencies without compiler builds
Replace `tool/update-deps` with a Ruby source scanner so dependency
updates no longer require GNU make, a configured build, or compiler
preprocessor output.

Keep compact source mappings and scanner declarations in dependency
files, and expand complete rules into the build directory.  Avoid the
temporary fixture headers required by the compiler-driven prototype.

Use the generated rules from GNU make, BSD make, and NMake builds.
Support out-of-tree and read-only source trees, and retain expanded
dependencies shipped in release archives when baseruby is unavailable.
2026-07-23 00:04:47 +09:00
Nobuyoshi Nakada
f3d86878f7
Update default gemspecs after update 2026-05-13 11:55:57 +09:00
Nobuyoshi Nakada
b94a7ec7c3
Suppress rev-parse error message when out-of-place build 2026-04-09 15:10:58 +09:00
Nobuyoshi Nakada
75e8401a61
Remove duplicate dependency 2026-03-19 10:35:25 +09:00
Kevin Newton
a70dbe1065 Use Prism for mk_builtin_loader.rb 2026-03-13 09:15:28 -04:00
Nobuyoshi Nakada
a3ee27fa3f
Fix rdoc:% target for bundled rdoc 2026-03-12 17:39:53 +09:00
Nobuyoshi Nakada
319de3c513
git must in in the source tree instead of the build directory 2026-02-26 20:32:00 +09:00
NARUSE, Yui
70c6251488 Use rev-parse HEAD instead of log --format=%H -1 2026-02-24 14:27:52 +09:00
Nobuyoshi Nakada
2d2afa8c17
Group rubyspec_capiext 2026-02-20 19:25:21 +09:00
Nobuyoshi Nakada
49ce12d2ef
Silence building rubyspec-capiext [ci skip] 2026-01-14 13:55:35 +09:00
Nobuyoshi Nakada
6a630d992e
Push the commits to the origin at make matz [ci skip] 2026-01-11 17:09:40 +09:00
Mike Dalessio
e6520de344 [Bug #21792] Build rubyspec-capiext only when excuting test-spec
rubyspec-capiext is only needed for running specs, not for building or
installing Ruby.
2025-12-20 22:24:52 +09:00
Nobuyoshi Nakada
6513cf9058
Export GIT
Propagate the value given with `--with-git` configure option to
tool/lib/vcs.rb.
2025-12-14 00:43:14 +09:00
Nobuyoshi Nakada
52426a22de
Remove an excess colon [ci skip] 2025-11-27 08:10:56 +09:00
Nobuyoshi Nakada
ae60b0bfd8
Use DOT_WAIT for old GNU make [ci skip] 2025-11-08 00:29:34 +09:00
Nobuyoshi Nakada
db57080450
[DOC] How to use make matz 2025-11-01 19:10:19 +09:00
Nobuyoshi Nakada
5ce27bef01
Flush NEWS.md only when NEW is not given
Split flushing NEWS and bumping up versions
2025-11-01 18:58:32 +09:00
Nobuyoshi Nakada
4b1279b6e9
Take MAJOR and MINOR from $(NEW) if given 2025-10-30 18:30:27 +09:00
Nobuyoshi Nakada
a2849239db
Expect git -C <path> to work
This option is available since git 1.8.5 that was released in 2013.
2025-09-16 20:28:37 +09:00
Nobuyoshi Nakada
6023195fbd
Abandon ruby target on the others than GNU make
The default non-transformed name, `ruby` target was added for the case
of `--program-transform-name` and similars, but it was occasionally
added even when no such option is used.
2025-08-28 19:01:48 +09:00
Nobuyoshi Nakada
75a968d88a
Add the recipe to fix/update depend files 2025-08-18 11:03:58 +09:00
Nobuyoshi Nakada
6b2d9ed2a5
Handle preperly comments in middle of lines in gems/bundled_gems 2025-08-12 16:04:57 +09:00
Hiroshi SHIBATA
be7b1164e6 Split autogenerated dependency to depend file from common.mk 2025-07-25 19:50:06 +09:00
Nobuyoshi Nakada
698cf146ac
Fetch only necessary commits of bundled gems 2025-06-09 23:41:13 +09:00
Nobuyoshi Nakada
7a56c31641
Revert "[Bug #21388] Make snapshots of gems"
This reverts commit e90282be7ba1bc8e3119f6e1a2c80356ceb3f80a, a commit miss.
2025-06-07 18:43:56 +09:00
Nobuyoshi Nakada
e90282be7b
[Bug #21388] Make snapshots of gems
If the revision of bundled gems is specified for ruby master (and
`git` is usable), checkout that revision and build a snapshot gem, and
use it for `test-spec` instead of the downloaded release version.
2025-06-07 18:41:36 +09:00
Alan Wu
92b218fbc3 YJIT: ZJIT: Allow both JITs in the same build
This commit allows building YJIT and ZJIT simultaneously, a "combo
build". Previously, `./configure --enable-yjit --enable-zjit` failed. At
runtime, though, only one of the two can be enabled at a time.

Add a root Cargo workspace that contains both the yjit and zjit crate.
The common Rust build integration mechanisms are factored out into
defs/jit.mk.

Combo YJIT+ZJIT dev builds are supported; if either JIT uses
`--enable-*=dev`, both of them are built in dev mode.

The combo build requires Cargo, but building one JIT at a time with only
rustc in release build remains supported.
2025-05-15 00:39:03 +09:00
Nobuyoshi Nakada
ed2806117a Do not let files depend on a phony target 2025-05-12 17:45:39 +09:00
Nobuyoshi Nakada
b48b841378 digest.so needs ruby/digest.h which is installed by build-ext 2025-05-12 02:50:25 +09:00
Nobuyoshi Nakada
204740b73f Revert "Try removing building C API specs in CRuby makefiles entirely"
This reverts commit 2a9236366d6016738a756caecab03263565a20c7.
spec/ruby/optional/capi/spec_helper.rb doesn't work well for mingw.
2025-05-12 02:50:25 +09:00
Benoit Daloze
2a9236366d Try removing building C API specs in CRuby makefiles entirely
* Since it does not work when using some configure options such as:
  .../configure --with-ext=-test-/cxxanyargs,+ --enable-shared
  as the CI does.
* It also duplicates the logic of spec/ruby/optional/capi/spec_helper.rb incorrectly.
  ruby/spec maintainers have no experience and no interest in dealing with these complicated CRuby build system issues.
  We asked help on the CRuby Slack and nobody helped so far.
2025-05-09 23:22:15 +02:00
Andrew Konchin
29be534fad Try fixing building C API specs with make
* But it doesn't work because there is no .ext/include/ruby/digest.h
  when using .../configure --with-ext=-test-/cxxanyargs,+ --enable-shared
  as the CI does.
2025-05-09 23:22:15 +02:00
Takashi Kokubun
82606faaea Add zjit.mk 2025-04-18 21:52:55 +09:00
Nobuyoshi Nakada
0d44e23831
Prevent test-bundled-gems outputs from mixing
Run test-bundled-gems-run and test-bundled-gems-spec sequentially.
2024-05-26 22:17:57 +09:00
Nobuyoshi Nakada
e937878883
Revert "Update revision.h if branch unmatch not only revision"
This reverts commit 5a332940ed2f809cb17af7e4d068089b6e1fa6ca.
Something does not work well on Github Actions.
2024-05-09 01:02:59 +09:00
Nobuyoshi Nakada
5a332940ed
Update revision.h if branch unmatch not only revision [ci skip] 2024-05-08 21:39:32 +09:00
Nobuyoshi Nakada
3169c15863
Fix rubyspec-capiext dependency
Not to build the rubyspec-capiext extension libraries again on the
next build after the build all extensions get built, ensure these
extensions are up to date when recursively building from exts.mk.
2024-04-19 14:12:41 +09:00
Nobuyoshi Nakada
53a8ad151b
Escape colons in pre-commit dependency [ci skip]
Colons are special in Makefiles.
2024-04-16 15:09:56 +09:00
Nobuyoshi Nakada
0fb39ab1b9
Clean intermediate files and debug info for each target
By replacing `ALLOBJS` suffix with intermediate file suffixes instead
of roughly removing by wildcards.  Made `cleanlibs` append `.dSYM`
suffix for each word in `TARGET_SO`, not the end of the entire list.
2024-03-10 22:12:00 +09:00
Nobuyoshi Nakada
2c787bf90f
Run POSTLINK for rubyspec CAPIEXT objects 2024-03-04 23:25:51 +09:00
Nobuyoshi Nakada
9cf1c2bb0c
Refresh NEWS.md at starting new development [ci skip] 2023-12-25 20:10:37 +09:00
Kazuhiro NISHIYAMA
0fb10074e1 Fix error when gems/src is read-only
When I shared srcdir as read-only in lima-vm,
`make install` causes following error:

```
Update rbs to 33813a60752624d58dfe5ae770b39bfaf29fbaf1
error: cannot open .git/FETCH_HEAD: Read-only file system
```

I cannot find any ignore option for `git checkout --detach`
when already checked out. So I add `if`.
2023-10-11 13:32:54 +09:00
Nobuyoshi Nakada
1527246a7e
Download Unicode files once [ci skip] 2023-09-26 02:09:57 +09:00
Nobuyoshi Nakada
2b41df2477 .NOTPARALLEL with prerequisites needs recent GNU Make
GNU Make prior to 4.4 just ignores the prerequisites, and runs
everything in serial.
2023-09-21 12:18:41 +09:00
Nobuyoshi Nakada
e22086bb6a
Enable .NOTPARALLEL on ripper_srcs
And add special treats only for old GNU make.
2023-09-13 12:11:43 +09:00
Nobuyoshi Nakada
2cc32ad67c
Split commit recipe and pass more macros 2023-09-11 11:04:33 +09:00
Nobuyoshi Nakada
f339937abb RJIT: Remove macros inherited from MJIT but no longer used 2023-08-17 08:33:52 +09:00
Nobuyoshi Nakada
b76c2ec005
Use :: form workflow commands 2023-08-15 23:30:40 +09:00
Nobuyoshi Nakada
2a3acbc420
Fix test and precheck order for old GNU Make 2023-08-14 11:30:05 +09:00