Changeset 273
- Timestamp:
- 03/17/2008 11:59:57 (8 months ago)
- Location:
- trunk
- Files:
-
- 1 modified
- 3 moved
-
Rakefile (modified) (11 diffs)
-
ext/redcloth_scan (moved) (moved from trunk/ext/superredcloth_scan)
-
lib/redcloth (moved) (moved from trunk/lib/superredcloth)
-
lib/redcloth.rb (moved) (moved from trunk/lib/superredcloth.rb) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Rakefile
r272 r273 7 7 include FileUtils 8 8 9 NAME = " superredcloth"9 NAME = "redcloth" 10 10 SUMMARY = "a fast library for formatting Textile and Markdown as HTML" 11 11 REV = `svn info`[/Revision: (\d+)/, 1] rescue nil 12 12 VERS = ENV['VERSION'] || "1" + (REV ? ".#{REV}" : "") 13 CLEAN.include ['ext/ superredcloth_scan/*.{bundle,so,obj,pdb,lib,def,exp}', 'ext/superredcloth_scan/Makefile',13 CLEAN.include ['ext/redcloth_scan/*.{bundle,so,obj,pdb,lib,def,exp}', 'ext/redcloth_scan/Makefile', 14 14 '**/.*.sw?', '*.gem', '.config'] 15 15 … … 18 18 19 19 desc "Compiles all extensions" 20 task :compile => [: superredcloth_scan] do21 if Dir.glob(File.join("lib"," superredcloth_scan.*")).length == 020 task :compile => [:redcloth_scan] do 21 if Dir.glob(File.join("lib","redcloth_scan.*")).length == 0 22 22 STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 23 23 STDERR.puts "Gem actually failed to build. Your system is" 24 STDERR.puts "NOT configured properly to build superredcloth."24 STDERR.puts "NOT configured properly to build redcloth." 25 25 STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" 26 26 exit(1) … … 28 28 end 29 29 30 desc "Packages up SuperRedCloth."30 desc "Packages up RedCloth." 31 31 task :package => [:clean, :ragel] 32 32 33 desc "Releases packages for all SuperRedCloth packages and platforms."33 desc "Releases packages for all RedCloth packages and platforms." 34 34 task :release => [:package, :rubygems_win32] 35 35 … … 68 68 # rdoc.template = "extras/flipbook_rdoc.rb" 69 69 rdoc.main = "README" 70 rdoc.title = " SuperRedCloth Documentation"70 rdoc.title = "RedCloth Documentation" 71 71 rdoc.rdoc_files.add ['README', 'CHANGELOG', 'COPYING', 'lib/**/*.rb'] 72 72 end … … 88 88 Dir.glob("{bin,doc,test,lib,extras}/**/*") + 89 89 Dir.glob("ext/**/*.{h,c,rb,rl}") + 90 %w[ext/ superredcloth_scan/superredcloth_scan.c] # needed because it's generated later90 %w[ext/redcloth_scan/redcloth_scan.c] # needed because it's generated later 91 91 92 92 s.require_path = "lib" 93 #s.autorequire = " superredcloth" # no no no this is tHe 3v1l93 #s.autorequire = "redcloth" # no no no this is tHe 3v1l 94 94 s.extensions = FileList["ext/**/extconf.rb"].to_a 95 95 s.bindir = "bin" … … 101 101 end 102 102 103 extension = " superredcloth_scan"104 ext = "ext/ superredcloth_scan"103 extension = "redcloth_scan" 104 ext = "ext/redcloth_scan" 105 105 ext_so = "#{ext}/#{extension}.#{Config::CONFIG['DLEXT']}" 106 106 ext_files = FileList[ 107 "#{ext}/ superredcloth_scan.c",108 "#{ext}/ superredcloth_inline.c",107 "#{ext}/redcloth_scan.c", 108 "#{ext}/redcloth_inline.c", 109 109 "#{ext}/extconf.rb", 110 110 "#{ext}/Makefile", … … 123 123 end 124 124 125 ["#{ext}/ superredcloth_scan.c","#{ext}/superredcloth_inline.c"].each do |name|125 ["#{ext}/redcloth_scan.c","#{ext}/redcloth_inline.c"].each do |name| 126 126 source = name.sub(/\.c$/, '.rl') 127 file name => [source, "#{ext}/ superredcloth_common.rl", "#{ext}/superredcloth.h"] do127 file name => [source, "#{ext}/redcloth_common.rl", "#{ext}/redcloth.h"] do 128 128 @ragel_v ||= `ragel -v`[/(version )(\S*)/,2].split('.').map{|s| s.to_i} 129 129 if @ragel_v[0] >= 6 … … 139 139 task extension.to_sym => ["#{ext}/Makefile", ext_so ] 140 140 141 file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "#{ext}/ superredcloth_scan.c","#{ext}/superredcloth_inline.c"] do141 file "#{ext}/Makefile" => ["#{ext}/extconf.rb", "#{ext}/redcloth_scan.c","#{ext}/redcloth_inline.c"] do 142 142 Dir.chdir(ext) do ruby "extconf.rb" end 143 143 end … … 148 148 "ext/**/*.{c,rb,h,rl}", 149 149 "CHANGELOG", "README", "Rakefile", "COPYING", 150 "extras/**/*", "lib/ superredcloth_scan.so"]150 "extras/**/*", "lib/redcloth_scan.so"] 151 151 152 152 Win32Spec = Gem::Specification.new do |s| … … 165 165 166 166 s.require_path = "lib" 167 #s.autorequire = " superredcloth" # no no no this is tHe 3v1l167 #s.autorequire = "redcloth" # no no no this is tHe 3v1l 168 168 s.extensions = [] 169 169 s.bindir = "bin" 170 170 end 171 171 172 WIN32_PKG_DIR = " superredcloth-" + VERS172 WIN32_PKG_DIR = "redcloth-" + VERS 173 173 174 174 file WIN32_PKG_DIR => [:package] do … … 176 176 end 177 177 178 desc "Cross-compile the superredcloth_scan extension for win32"179 file " superredcloth_scan_win32" => [WIN32_PKG_DIR] do180 cp "extras/mingw-rbconfig.rb", "#{WIN32_PKG_DIR}/ext/ superredcloth_scan/rbconfig.rb"181 sh "cd #{WIN32_PKG_DIR}/ext/ superredcloth_scan/ && ruby -I. extconf.rb && make"182 mv "#{WIN32_PKG_DIR}/ext/ superredcloth_scan/superredcloth_scan.so", "#{WIN32_PKG_DIR}/lib"178 desc "Cross-compile the redcloth_scan extension for win32" 179 file "redcloth_scan_win32" => [WIN32_PKG_DIR] do 180 cp "extras/mingw-rbconfig.rb", "#{WIN32_PKG_DIR}/ext/redcloth_scan/rbconfig.rb" 181 sh "cd #{WIN32_PKG_DIR}/ext/redcloth_scan/ && ruby -I. extconf.rb && make" 182 mv "#{WIN32_PKG_DIR}/ext/redcloth_scan/redcloth_scan.so", "#{WIN32_PKG_DIR}/lib" 183 183 end 184 184 185 185 desc "Build the binary RubyGems package for win32" 186 task :rubygems_win32 => [" superredcloth_scan_win32"] do186 task :rubygems_win32 => ["redcloth_scan_win32"] do 187 187 Dir.chdir("#{WIN32_PKG_DIR}") do 188 188 Gem::Builder.new(Win32Spec).build 189 189 verbose(true) { 190 mv Dir["*.gem"].first, "../pkg/ superredcloth-#{VERS}-mswin32.gem"190 mv Dir["*.gem"].first, "../pkg/redcloth-#{VERS}-mswin32.gem" 191 191 } 192 192 end -
trunk/lib/redcloth.rb
r272 r273 1 require ' superredcloth_scan'1 require 'redcloth_scan' 2 2 3 3 $:.unshift(File.dirname(__FILE__)) 4 4 5 require ' superredcloth/html'6 require ' superredcloth/latex'5 require 'redcloth/html' 6 require 'redcloth/latex'