diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-04-01 11:43:57 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-04-01 11:43:57 +0100 |
commit | dbd6343217ab77c37948d1202541ae33076155ab (patch) | |
tree | 62d7ddcfa9380f527c212ab61599558d4a81fdce /constants.rb | |
parent | f067f0c9b8b69b80b9e4e035d2130f8fca58370c (diff) | |
download | json-dbd6343217ab77c37948d1202541ae33076155ab.tar.gz |
Put the json and json_pure gemspecs in standalone .gemspec files so that they can be used by Bundler
Diffstat (limited to 'constants.rb')
-rw-r--r-- | constants.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/constants.rb b/constants.rb new file mode 100644 index 0000000..1e15aef --- /dev/null +++ b/constants.rb @@ -0,0 +1,31 @@ +require 'rbconfig' +include Config + +PKG_NAME = 'json' +PKG_TITLE = 'JSON Implementation for Ruby' +PKG_VERSION = File.read('VERSION').chomp +PKG_FILES = Dir.glob("**/**").reject { |file| + file =~ /CVS|pkg|tmp|coverage|Makefile|\.nfs\.|\.iml\Z/ || + file =~ /\.(so|bundle|o|class|#{CONFIG['DLEXT']})$/ + } + +EXT_ROOT_DIR = 'ext/json/ext' +EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser" +EXT_PARSER_DL = "#{EXT_PARSER_DIR}/parser.#{CONFIG['DLEXT']}" +RAGEL_PATH = "#{EXT_PARSER_DIR}/parser.rl" +EXT_PARSER_SRC = "#{EXT_PARSER_DIR}/parser.c" +PKG_FILES << EXT_PARSER_SRC +EXT_GENERATOR_DIR = "#{EXT_ROOT_DIR}/generator" +EXT_GENERATOR_DL = "#{EXT_GENERATOR_DIR}/generator.#{CONFIG['DLEXT']}" +EXT_GENERATOR_SRC = "#{EXT_GENERATOR_DIR}/generator.c" + +JAVA_DIR = "java/src/json/ext" +JAVA_RAGEL_PATH = "#{JAVA_DIR}/Parser.rl" +JAVA_PARSER_SRC = "#{JAVA_DIR}/Parser.java" +JAVA_SOURCES = Dir.glob("#{JAVA_DIR}/*.java") +JAVA_CLASSES = [] +JRUBY_PARSER_JAR = File.expand_path("lib/json/ext/parser.jar") +JRUBY_GENERATOR_JAR = File.expand_path("lib/json/ext/generator.jar") + +RAGEL_CODEGEN = %w[rlcodegen rlgen-cd ragel].find { |c| system(c, '-v') } +RAGEL_DOTGEN = %w[rlgen-dot rlgen-cd ragel].find { |c| system(c, '-v') } |