Sha256: 397a3df2ddc63e9a92a13e6a65c90d4a0a0cb3e9d4ec00c8e671b76cb5e4613d

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

CLEAN.include [
  'tmp',
  '**/*.{o,obj,class,pdb,lib,def,exp,log,rbc}',
  'ext/redcloth_scan/**/redcloth_*.rb',
  'ext/redcloth_scan/Makefile',  'ext/redcloth_scan/extconf.rb',
]
CLOBBER.include [
  'pkg',
  '**/*.{c,java}',
  'lib/**/*.{bundle,so,o,obj,pdb,lib,def,exp,jar}',
  'lib/redcloth_scan.rb',
]

# Load the Gem specification for the current platform (Ruby or JRuby).
def gemspec(platform = 'ruby')
  Gem::Specification.load(File.expand_path('../../redcloth.gemspec', __FILE__))
end

require 'rake/extensiontask'
require File.dirname(__FILE__) + '/ragel_extension_task'


extconf = "ext/redcloth_scan/extconf.rb"
file extconf do
    FileUtils.mkdir(File.dirname(extconf)) unless File.directory?(File.dirname(extconf))
    File.open(extconf, "w") do |io|
      io.write(<<-EOF)
require 'mkmf'
CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
$CFLAGS << ' -O0 -Wall ' if CONFIG['CC'] =~ /gcc/
dir_config("redcloth_scan")
create_makefile("redcloth_scan")
      EOF
    end
end

Rake::RagelExtensionTask.new("redcloth_scan", gemspec) do |ext|
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
RedCloth-4.3.4 tasks/compile.rake