mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Document building with GNU make on mswin
A ruby built this way also builds extension libraries with `make` from PATH, so installing gems with C extensions needs GNU make there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
77cb678ee4
commit
c498dc697a
1 file changed
+21
Notes:
git
2026-10-15 09:17:23 +00:00
@@ -303,6 +303,27 @@ sh ../../ruby/configure -C --disable-install-doc --with-opt-dir=C:\Users\usernam
|
||||
nmake install
|
||||
```
|
||||
|
||||
### Building with GNU make
|
||||
|
||||
`nmake` cannot run jobs in parallel. `win32\configure.bat --with-gnu-make` writes `GNUmakefile` instead of `Makefile`, so that you can build with `make -j`. This is experimental, and `nmake` stays the default.
|
||||
|
||||
GNU make 4.4 or later built for native Windows is required. `win32\install-gnumake.cmd` downloads the GNU make release, verifies its SHA256, builds it with `cl`, and puts `make.exe` in `.gnumake` under the ruby source directory, or in the directory given as its argument.
|
||||
|
||||
```batch
|
||||
C:
|
||||
cd \ruby
|
||||
win32\install-gnumake.cmd
|
||||
set PATH=C:\ruby\.gnumake;%PATH%
|
||||
win32\configure --prefix=/usr/local --with-opt-dir=C:/ruby/vcpkg_installed/x64-windows --with-gnu-make
|
||||
make -j16
|
||||
make check
|
||||
make install
|
||||
```
|
||||
|
||||
Use `make` in place of `nmake` for the other targets in this document too, such as `make up`, `make prepare-vcpkg` and `make update-vcpkg`.
|
||||
|
||||
The installed ruby also builds extension libraries with `make` found in `PATH`, not with `nmake`. Before installing gems with C extensions, copy `make.exe` from `.gnumake` to a directory in `PATH`, such as the `bin` directory of the install directory, since `make install` does not install it.
|
||||
|
||||
### Bugs
|
||||
|
||||
You can **NOT** use a path name that contains any white space characters
|
||||
|
||||
Reference in new issue
Block a user