Skip to content

Commit

Permalink
Merge pull request #1146 from flavorjones/flavorjones-export-build-op…
Browse files Browse the repository at this point in the history
…tions

Move the gem's C extension into lib/yarp/
  • Loading branch information
kddnewton authored Aug 1, 2023
2 parents c4aa37a + a88b613 commit 138de9b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ or explicitly running the `compile` task:

``` sh
bundle exec rake compile test
# or to just compile the C extension ...
bundle exec rake compile:yarp test
```

## Documentation
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ else
Rake::ExtensionTask.new(:compile) do |ext|
ext.name = "yarp"
ext.ext_dir = "ext/yarp"
ext.lib_dir = "lib"
ext.lib_dir = "lib/yarp"
ext.gem_spec = Gem::Specification.load("yarp.gemspec")
end
end

# So `rake clobber` will delete generated files
CLOBBER.concat(TEMPLATES)
CLOBBER.concat(["configure", "Makefile", "build", "config.h.in", "include/yarp/config.h"])
CLOBBER << "lib/yarp.#{RbConfig::CONFIG["DLEXT"]}"
CLOBBER << "lib/yarp/yarp.#{RbConfig::CONFIG["DLEXT"]}"

TEMPLATES.each do |filepath|
desc "Generate #{filepath}"
Expand Down
2 changes: 1 addition & 1 deletion ext/yarp/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def configure
configure_c_extension
configure_rubyparser

create_makefile("yarp")
create_makefile("yarp/yarp")
end

def configure_c_extension
Expand Down
3 changes: 2 additions & 1 deletion lib/yarp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,5 @@ def self.newlines(source)
require_relative "yarp/ripper_compat"
require_relative "yarp/serialize"
require_relative "yarp/pack"
require "yarp.so"

require "yarp/yarp"
6 changes: 5 additions & 1 deletion tasks/check_manifest.rake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ task :check_manifest => [:templates, "configure"] do
configure.ac
compile_commands.json
include/yarp/config.h
lib/yarp.{jar,so,bundle}
java/org/yarp/AbstractNodeVisitor.java
java/org/yarp/Loader.java
java/org/yarp/Nodes.java
java/org/yarp/Parser.java
lib/yarp/yarp.{so,bundle,jar}
tags
test.c
test.rb
Expand Down

0 comments on commit 138de9b

Please sign in to comment.