Separated the Java and C ext codebases.

This commit is contained in:
Yorick Peterse 2014-05-07 00:29:10 +02:00
parent b8efed5177
commit 9abc5c1c92
14 changed files with 24 additions and 19 deletions

4
.gitignore vendored
View File

@ -13,5 +13,5 @@ profile/samples/*/*.txt
*.so
tmp
ext/liboga/lexer.c
ext/liboga/org/liboga/xml/Lexer.java
ext/c/lexer.c
ext/java/org/liboga/xml/Lexer.java

View File

@ -5,16 +5,17 @@ README.md
doc/DCO.md
doc/changelog.md
doc/css/common.css
ext/liboga/LibogaService.java
ext/liboga/extconf.rb
ext/liboga/lexer.c
ext/liboga/lexer.h
ext/liboga/lexer.rl
ext/liboga/liboga.c
ext/liboga/liboga.h
ext/liboga/org/liboga/xml/Lexer.java
ext/liboga/xml.c
ext/liboga/xml.h
ext/c/extconf.rb
ext/c/lexer.c
ext/c/lexer.h
ext/c/lexer.rl
ext/c/liboga.c
ext/c/liboga.h
ext/c/xml.c
ext/c/xml.h
ext/java/LibogaService.java
ext/java/org/liboga/xml/Lexer.java
ext/java/org/liboga/xml/Lexer.rl
lib/oga.rb
lib/oga/html/parser.rb
lib/oga/version.rb

View File

@ -7,11 +7,15 @@ GEMSPEC = Gem::Specification.load('oga.gemspec')
if RUBY_PLATFORM == 'java'
require 'rake/javaextensiontask'
Rake::JavaExtensionTask.new('liboga', GEMSPEC)
Rake::JavaExtensionTask.new('liboga', GEMSPEC) do |task|
task.ext_dir = 'ext/java'
end
else
require 'rake/extensiontask'
Rake::ExtensionTask.new('liboga', GEMSPEC)
Rake::ExtensionTask.new('liboga', GEMSPEC) do |task|
task.ext_dir = 'ext/c'
end
end
PARSER_OUTPUT = 'lib/oga/xml/parser.rb'
@ -24,8 +28,8 @@ CLEAN.include(
'profile/samples/**/*.txt',
'lib/liboga.*',
'tmp',
'ext/liboga/lexer.c',
'ext/liboga/org/liboga/xml/Lexer.java'
'ext/c/lexer.c',
'ext/java/org/liboga/xml/Lexer.java'
)
FILE_LIST = FileList.new(

View File

@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.platform = 'java'
else
s.extensions = ['ext/liboga/extconf.rb']
s.extensions = ['ext/c/extconf.rb']
end
s.has_rdoc = 'yard'

View File

@ -26,6 +26,6 @@ end
desc 'Generates the lexers'
multitask :lexer => [
'ext/liboga/lexer.c',
'ext/liboga/org/liboga/xml/Lexer.java'
'ext/c/lexer.c',
'ext/java/org/liboga/xml/Lexer.java'
]