Rakefile
changeset 16 e135ccae6783
parent 15 a38e6916504c
child 17 23c7f5c8ee39
--- a/Rakefile	Fri May 12 11:09:36 2017 -0700
+++ b/Rakefile	Fri May 12 16:17:41 2017 -0700
@@ -3,6 +3,12 @@
 
 require 'pathname'
 
+begin
+	require 'rake/extensiontask'
+rescue LoadError
+	abort "This Rakefile requires rake-compiler (gem install rake-compiler)"
+end
+
 PROJECT = 'ezmlm'
 BASEDIR = Pathname.new( __FILE__ ).expand_path.dirname.relative_path_from( Pathname.getwd )
 LIBDIR  = BASEDIR + 'lib'
@@ -49,6 +55,7 @@
 (The -idx provides an extended feature set over the original ezmlm
 environment.)
 	EOF
+	s.extensions = FileList[ "ext/**/extconf.rb" ]
 	s.required_ruby_version = '>= 2.1'
 
 	s.add_dependency 'mail', "~> 2.6"
@@ -60,6 +67,9 @@
 	pkg.need_tar = true
 end
 
+# Build the C extension for hashing addresses.
+Rake::ExtensionTask.new( 'ezmlm/hash', spec )
+
 
 ########################################################################
 ### D O C U M E N T A T I O N
@@ -74,7 +84,7 @@
 		rdoc.rdoc_dir   = 'docs'
 		rdoc.main       = "README.rdoc"
 		# rdoc.options    = [ '-f', 'fivefish' ]
-		rdoc.rdoc_files = [ 'lib', *FileList['*.rdoc'] ]
+		rdoc.rdoc_files = [ 'lib', *FileList['ext/*/*.c'], *FileList['*.rdoc'] ]
 	end
 
 	RDoc::Task.new do |rdoc|
@@ -116,6 +126,12 @@
 ### M A N I F E S T
 ########################################################################
 __END__
+ext/ezmlm/hash/hash.c
+ext/ezmlm/hash/hash.h
+ext/ezmlm/hash/extconf.rb
 lib/ezmlm/list.rb
+lib/ezmlm/list/message.rb
+lib/ezmlm/list/thread.rb
+lib/ezmlm/list/author.rb
 lib/ezmlm.rb