summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
Commit message (Collapse)AuthorAgeFilesLines
* MSWin: Use MESSAGE_BEGIN/MESSAGE_END instead of bare `echo`Nobuyoshi Nakada2023-03-021-4/+13
| | | | To strip enclosing double quotes.
* Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada2022-11-211-5/+3
|
* Clean extension build directories and exts.mk fileNobuyoshi Nakada2022-11-161-2/+8
|
* Remove `-j` option from `MFLAGS` for sub-makesNobuyoshi Nakada2022-11-161-0/+1
|
* Make the timestamp path correspond to the bundled target pathNobuyoshi Nakada2022-10-241-2/+7
| | | | | | | So different timestamps for different paths will be used. Extentions paths in bundled gems contain `ruby_version`, which includes the ABI version, and the same timestamp file for different paths resulted in build failures when it changed.
* Quiet if the target is already linked the same sourceNobuyoshi Nakada2022-09-201-1/+1
|
* Create temporary file exclusively and cleanNobuyoshi Nakada2022-08-071-2/+7
|
* Resolve abi symbol references from miniruby to avoid circular depsYuta Saito2022-08-041-1/+1
| | | | | | | | | | | | | | | | | | Adding `ruby` to `PREP` causes the following circular dependencies because `PREP` is used as a prerequisite by some targets required to build `ruby` target itself. ``` make: Circular .rbconfig.time <- ruby dependency dropped. make: Circular builtin_binary.inc <- ruby dependency dropped. make: Circular ext/extinit.c <- ruby dependency dropped. make: Circular ruby <- ruby dependency dropped. ``` Adding a new Make variable like `EXTPREP` only for exts may be also reasonable, but it would introduce another complexity into our build system. `-bundle_loader` doesn't care that link-time and run-time loader executables are different as long as bound symbols are provided, so it's ok to resolve from miniruby to simplify our build.
* Use $(bindir) for path to executable in mkmfAlan Wu2022-08-041-1/+1
| | | | | | | | | | | | | | | | For the macOS -bundle_loader linker option, we need a path to the Ruby exectuable. $(RUBY) is not necessarily a path since it could be a command line invocation. That happens during build with runruby.rb and can happen post installation if the user passes the --ruby option to a extconf.rb. Use $(bindir) to locate the executable instead. Before installation, $(bindir) doesn't exist, so we need to be able to override $(BUILTRUBY) in such situations so test-spec and bundled extensions could build. Use a new mkmf global, $builtruby, to do this; set it in fake.rb and in extmk.rb. Our build system is quite complex...
* Link ext bundles with bundle loader option for newer ld64Yuta Saito2022-08-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ld64 shipped with Xcode 14 emits a warning when using `-undefined dynamic_lookup`. ``` ld: warning: -undefined dynamic_lookup may not work with chained fixups ``` Actually, `-undefined dynamic_lookup` doesn't work when: 1. Link a *shared library* with the option 2. Link it with a program that uses the chained-fixup introduced from macOS 12 and iOS 15 because `-undefined dynamic_lookup` uses lazy-bindings and they won't be bound while dyld fixes-up by traversing chained-fixup info. However, we build exts as *bundles* and they are loaded only through `dlopen`, so it's safe to use `-undefined dynamic_lookup` in theory. So the warning produced by ld64 is false-positive, and it results failure of option checking in configuration. Therefore, it would be an option to ignore the warning during our configuration. On the other hand, `-undefined dynamic_lookup` is already deprecated on all darwin platforms except for macOS, so it's good time to get rid of the option. ld64 also provides `-bundle_loader <executable>` option, which allows to resolve symbols defined in the executable symtab while linking. It behaves almost the same with `-undefined dynamic_lookup`, but it makes the following changes: 1. Require that unresolved symbols among input objects must be defined in the executable. 2. Lazy symbol binding will lookup only the symtab of the bundle loader executable. (`-undefined dynamic_lookup` lookups all symtab as flat namespace) This patch adds `-bundle_loader $(RUBY)` when non-EXTSTATIC configuration by assuming ruby executable can be linked before building exts. See "New Features" subsection under "Linking" section for chained fixup https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes
* Make extensions under `Gem.extension_api_version` directoryNobuyoshi Nakada2022-07-241-1/+2
|
* Avoid to symlink under symlinkNobuyoshi Nakada2022-07-161-1/+1
|
* Move copying/linking extra files to Makefile so removed by `clean`Nobuyoshi Nakada2022-07-161-33/+48
|
* Ensure symlinks to bundled gem with exts have parent dirYuta Saito2022-07-151-0/+1
| | | | | | | | | | When configuring with `--disable-rpath` and `--static-linked-ext` (e.g. building for WASI), `extmk.rb` doesn't build exts under bundled gems, and `.bundle/gems/#{gemname}-#{ver}` are not created due to no call of `extmake`. b2491783986084770f6f97552f27b868622730cf starts creating symlink at `.bundle/gems/#{gemname}-#{ver}/lib`, but the parent dir is not created, so configuration aginst debug and rbs gems were failed.
* Install gems `lib` directory to build pathNobuyoshi Nakada2022-07-141-0/+19
|
* Make dependency-free gemspec filesNobuyoshi Nakada2022-07-141-0/+11
| | | | | | | The default gems have not been installed yet in the build directory, bundled gems depending on them can not work. As those dependencies should be usable there even without rubygems, make temporary gemspec files without the dependencies, and use them in the build directory.
* Move timestamps directory for bundled gemsNobuyoshi Nakada2022-07-131-1/+4
|
* Move the target directory of bundled gems like as rubygemsNobuyoshi Nakada2022-04-071-1/+5
|
* Bundled gems are expanded under `.bundle/gems` nowNobuyoshi Nakada2022-04-071-6/+7
|
* transcode-tblgen.rb: make silent a little when just -vNobuyoshi Nakada2020-12-291-0/+1
|
* Configure static extensions only if in chargeNobuyoshi Nakada2019-11-191-1/+5
| | | | | Get rid of races in parallel configuration when using the ext/Setup file.
* Revert "DEBUG: dump mkmf.log"Nobuyoshi Nakada2019-09-191-8/+0
| | | | | | This reverts commit 69e209a3450bd6b281dcad1d96a34e9cab184845. The debug has finishted.
* Removed mkmf.log dump in MakefileNobuyoshi Nakada2019-09-191-3/+5
|
* DEBUG: dump mkmf.logNobuyoshi Nakada2019-09-191-0/+6
|
* catch up e8ddbc0239.Koichi Sasada2019-07-151-2/+2
|
* Let sub-directory exts depend on their parent extmrkn2018-12-011-1/+10
| | | | | | | | * ext/extmk.rb: Let sub-directory exts depend on their parent ext. * template/exts.mk.tmpl: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: get rid of shadowing outer local variablenobu2018-03-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: exclude recursivelynobu2018-01-071-3/+7
| | | | | | * ext/extmk.rb: exclude extension libraries recursively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb: colorize notes [Feature #13302]nobu2017-04-211-5/+10
| | | | | | | | | | * common.mk (build-ext): pass variables to colorize. * ext/extmk.rb: colorize notes with tool/colorize.rb. * tool/colorize.rb: extract from tool/generic_erb.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* exts.mk: refine notes [Feature #13302]nobu2017-04-211-3/+10
| | | | | | | | | | * ext/extmk.rb: split notes into header and footer, which are common, from bodies which are unique for each extensions. * template/exts.mk.tmpl: now each notes are not one line, should not unique. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: fail for mandatory librariesnobu2017-04-201-4/+12
| | | | | | | | | * ext/extmk.rb: fail if a mandatory extension library failed to configure. [ruby-core:80759] [Feature #13302] * template/exts.mk.tmpl: move `exit` at the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: improve message printed when configuring extensions failsrhe2017-04-191-19/+18
| | | | | | | Point to the mkmf.log if configuring an extension fails so that people can find and fix the culprit easily. [ruby-core:80131] [Feature #13302] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning: shadowing outer local variable - enaruse2017-03-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* clean gemsnobu2017-02-281-0/+2
| | | | | | * Makefile.in (clean-ext): clean gem directories too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: split notesnobu2017-02-101-2/+5
| | | | | | | * ext/extmk.rb: split notes and echo per lines, for multiple lines messages. [ruby-core:79475] [Bug #13200] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: remove clean and install modenobu2017-01-281-89/+16
| | | | | | | * ext/extmk.rb (parse_args): remove clean and install mode, now configure mode only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: remove direct build modenobu2017-01-281-8/+3
| | | | | | | * ext/extmk.rb (parse_args): --command-output is now mandatory. remove direct build mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* exts.mk.tmpl: ruby namesnobu2017-01-281-1/+1
| | | | | | * template/exts.mk.tmpl: extract configured ruby names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: fix for static-linked-extnobu2017-01-271-2/+2
| | | | | | | | * ext/extmk.rb (extmake): fix up r57424 for static-linked-ext. separate maybestatic argument from basedir which is given always now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Parallel gem configurationnobu2017-01-261-56/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Parallel ext configurationnobu2017-01-231-3/+5
| | | | | | | | | | * ext/configure-ext.mk: configure each directories underneath ext in parallel. * template/exts.mk.tmpl: then collect the results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extinit.c.tmpl: drop after dotnobu2017-01-231-3/+3
| | | | | | | * template/extinit.c.tmpl: drop rest from the first dot in the base name of a feature is ignored since r30464. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: EXTINITS to sub makenobu2017-01-231-0/+1
| | | | | | | | * ext/extmk.rb: pass EXTINITS to sub make. if the template for extinit.c is modified after extinit.c got compiled, extinit.c will be re-generated together with ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* template/extinit.c.tmplnobu2017-01-221-21/+4
| | | | | | * template/extinit.c.tmpl: separate from ext/extmk.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: ignore generated sourcesnobu2017-01-201-1/+1
| | | | | | | * ext/extmk.rb (extract_makefile): ignore generated source files not to reconfigure when in-place build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: removed compiled? method [ci skip]nobu2016-11-181-7/+0
| | | | | | | | | * ext/extmk.rb (compiled?): removed. * ext/win32/extconf.rb: try to install libraries regardless fiddle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* install extra librariesnobu2016-09-241-0/+13
| | | | | | | | | * ext/extmk.rb (extract_makefile, extmake, configuration): store extra libraries to be installed. * tool/rbinstall.rb (ext-arch): install extra libraries. * ext/zlib/extconf.rb: install zlib if built. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: no ext, no build_completenobu2016-09-041-1/+2
| | | | | | | * ext/extmk.rb (create_makefile): touch gem.build_complete only if building an extension library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: fix gem.build_complete locationnobu2016-09-041-2/+3
| | | | | | | * ext/extmk.rb (timestamp_file): make build_complete file at the toplevel of the gem directory without target_prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: expand target_prefixnobu2016-09-041-1/+1
| | | | | | | * ext/extmk.rb (timestamp_file): should expand target_prefix in timestamp file name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e