diff options
author | Florian Frank <flori@ping.de> | 2009-10-19 14:41:42 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2009-10-19 14:41:42 +0200 |
commit | 78ec4778444b7d7932b0ac8357a3849bd0fe66d1 (patch) | |
tree | 939b706d78f82373c248ba185c35f8b072118d69 /Rakefile | |
parent | 4b341a77453ddfd6d147ede81a7f59b7f4d033b5 (diff) | |
parent | 457cef9a455aa1a6e4e5341e380df37c75de0d74 (diff) | |
download | json-78ec4778444b7d7932b0ac8357a3849bd0fe66d1.tar.gz |
Merge commit '457cef9a455aa1a6e4e5341e380df37c75de0d74'
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,8 +1,14 @@ begin require 'rake/gempackagetask' +rescue LoadError +end + +begin require 'rake/extensiontask' rescue LoadError + puts "WARNING: rake-compiler is not installed. You will not be able to build the json gem until you install it." end + require 'rake/clean' CLOBBER.include Dir['benchmarks/data/*.{dat,log}'] @@ -105,7 +111,7 @@ task :ragel_dot_ps do root = 'diagrams' specs = [] File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 } - for s in specs + for s in specs if RAGEL_DOTGEN == 'ragel' sh "ragel #{RAGEL_PATH} -S#{s} -p -V | dot -Tps -o#{root}/#{s}.ps" else @@ -119,7 +125,7 @@ task :ragel_dot_png do root = 'diagrams' specs = [] File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 } - for s in specs + for s in specs if RAGEL_DOTGEN == 'ragel' sh "ragel #{RAGEL_PATH} -S#{s} -p -V | dot -Tpng -o#{root}/#{s}.png" else @@ -243,7 +249,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension ext.ext_dir = 'ext/json/ext/parser' ext.lib_dir = 'lib/json/ext' end - + Rake::ExtensionTask.new do |ext| ext.name = 'generator' ext.gem_spec = spec_ext |