summaryrefslogtreecommitdiff
path: root/lib/rake/baseextensiontask.rb
Commit message (Collapse)AuthorAgeFilesLines
* baseextensiontask: provide an API to allow for dynamic sources (#211)James Tucker2023-03-071-1/+3
| | | | | | | | | | | | | | | | | | If a build wishes to generate some of the extension source files then the pattern input is insufficient. Provide a place to stash an additional FileList that will then become a dependency of the compile tasks. Example: ```ruby file 'ext/libfoo/generated.c' do |t| open(t.name, 'w+) { |f| f << '#include <foo.h>' } end Rake::ExtensionTask.new('foo') do |ext| ext.extra_sources << 'generated.c' end ```
* Add support for RubyGems 3.3.21 or later (#209)Mike Dalessio2022-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Rubygems 3.3.21, the Gem::Platform name always contains the library version for gnu platforms. So where the rake-compiler config entries previously were: ```yaml --- rbconfig-x86_64-linux-gnu-2.7.0: "/usr/local/rake-compiler/ruby/x86_64-redhat-linux/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux-gnu/rbconfig.rb" rbconfig-x86_64-linux-2.7.0: "/usr/local/rake-compiler/ruby/x86_64-redhat-linux/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux-gnu/rbconfig.rb" ``` with later versions of rubygems, it is only ```yaml --- rbconfig-x86_64-linux-gnu-2.7.0: "/usr/local/rake-compiler/ruby/x86_64-redhat-linux/ruby-2.7.0/lib/ruby/2.7.0/x86_64-linux-gnu/rbconfig.rb" ``` This means that the current way of finding a matching runtime, by doing a string comparison on the config keys, is no longer appropriate. This is causing failing builds downstream in `rake-compiler-dock`. This PR: - extracts a new CompilerConfig class to encapsulate the logic - uses `Gem::Platform#=~` to tell if the gem platform matches the runtime platform
* Defer requiring yamlSutou Kouhei2022-04-151-6/+0
| | | | | | | Because yaml requires stringio implicitly. If stringio is required, we can't use rake-compiler for stringio. See also: https://github.com/ruby/stringio/pull/21#issuecomment-1082632676
* Accept Symbol as nameSutou Kouhei2021-12-121-2/+2
|
* Fix a regression bugSutou Kouhei2021-12-121-0/+3
| | | | | | | | | | | GitHub: fix GH-196 It's caused when name that includes "/" is specified to Rake::ExtensionTask.new and the default lib_dir is used such as https://github.com/konsolebox/digest-xxhash-ruby . In the case, built binaries are copied to lib/ not lib/XXX/. Reported by konsolebox. Thanks!!!
* :warning: method redefinedAkira Matsuda2017-05-191-1/+1
|
* Really support extension in sub directoryKouhei Sutou2016-06-211-1/+1
|
* Accept symbol name in extension taskTakashi Kokubun2016-05-091-0/+1
|
* Use basename of ext name as target filenameKenta Murata2016-04-241-1/+1
|
* Remove needless shebangsKouhei Sutou2015-03-161-2/+0
|
* Do not cache the list of source_filesScott Gonyea2012-08-011-1/+1
| | | | This allows me to run a task which generates java source files, prior to having rake-compiler compile them.
* Pass extra Rake cmd line args to extconf.rbJon2011-10-041-0/+2
| | | | | | Example usage: rake compile -- --with-libyaml-dir=C:/devlibs/libyaml
* Use Gem::PackageTask instead of Rake oneLuis Lavena2011-06-081-2/+0
| | | | | | | | | Rake::GemPackageTask is deprecated and will be removed. Gem::PackageTask has been present since RubyGems 1.3.2 and should be used instead. rake-compiler already depends on rubygems >= 1.3.5 so no damage done here.
* prefer psych on 1.9.2 if possibleAaron Patterson2011-02-051-0/+6
|
* Fix handling of jar command line argumentsAlex Coles2009-12-071-0/+4
| | | | | | | | | | | | | * Pass explicit list of .class files, not wildcard. * Because jar output directory is same as directory containing .class files, it appeared that the jar command line tool was trying to recursively jar itself. * Handle case where $ in .class file names (seen with use of inner classes, etc.) was being expanded out on *NIX systems. * Change feature to test for the above. * Thanks to Luis for helping work through this and ensuring compatibility with both *NIX and Windows systems. Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
* Warn only once.Luis Lavena2009-12-061-0/+7
| | | | | Reduce to only one the display of warnings about usage of ExtensionTask or JavaExtensionTask in mixed environments.
* Minor corrections to require definitionsLuis Lavena2009-12-061-0/+2
| | | | | File.expand_path is not recommended on 1.9, stick to plain require should work.
* Manual integration of JRuby support, by Alex ColesAlex Coles2009-12-061-0/+71
JRuby support created by Alex Coles. Merge done manually to avoid excesive cherry-picking