Commits

Michael Granger committed 1f8dd92

Merged JRuby fix into the build system, pulled down other build-system updates. Thanks to timfel for the fix.

  • Participants
  • Parent commits 4f705f6

Comments (0)

Files changed (2)

-d02b12b06250f087f46cb3179b8c7728c0e6d247 rake
+358cc46bbb172bafc9275a8ab9cf81e9291472c0 rake
 	PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ]
 end
 
-PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION )
+PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION ) && !PKG_VERSION.nil?
 
 PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}"
 GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem"
 
 ARTIFACTS_DIR = Pathname.new( CC_BUILD_ARTIFACTS )
 
-TEXT_FILES    = Rake::FileList.new( %w[Rakefile ChangeLog README LICENSE] )
+TEXT_FILES    = Rake::FileList.new( %w[Rakefile ChangeLog README* LICENSE] )
 BIN_FILES     = Rake::FileList.new( "#{BINDIR}/*" )
 LIB_FILES     = Rake::FileList.new( "#{LIBDIR}/**/*.rb" )
 EXT_FILES     = Rake::FileList.new( "#{EXTDIR}/**/*.{c,h,rb}" )
 
 # Set the build ID if the mercurial executable is available
 if hg = which( 'hg' )
-	id = `#{hg.to_s} id -n`.chomp
+	id = `#{hg} id -n`.chomp
 	PKG_BUILD = "pre%03d" % [(id.chomp[ /^[[:xdigit:]]+/ ] || '1')]
 else
 	PKG_BUILD = 'pre000'
 
 # Documentation constants
 API_DOCSDIR = DOCSDIR + 'api'
+README_FILE = TEXT_FILES.find {|path| path =~ /^README/ } || 'README'
 RDOC_OPTIONS = [
 	'--tab-width=4',
 	'--show-hash',
 	'--include', BASEDIR.to_s,
-	'--main=README',
+	"--main=#{README_FILE}",
 	"--title=#{PKG_NAME}",
   ]
 YARD_OPTIONS = [
 	'--use-cache',
 	'--no-private',
 	'--protected',
-	'-r', 'README',
+	'-r', README_FILE,
 	'--exclude', 'extconf\\.rb',
 	'--files', 'ChangeLog,LICENSE',
 	'--output-dir', API_DOCSDIR.to_s,
 	'text-format'  => '>= 1.0.0',
 	'tmail'        => '>= 1.2.3.1',
 	'diff-lcs'     => '>= 1.1.2',
+	'rake-compiler' => '>=0.7.0',
 }
 
 # Non-gem requirements: packagename => version
 
 	gem.has_rdoc          = true
 	gem.rdoc_options      = RDOC_OPTIONS
-	gem.extra_rdoc_files  = %w[ChangeLog README LICENSE]
+	gem.extra_rdoc_files  = TEXT_FILES - [ 'Rakefile' ]
 
 	gem.bindir            = BINDIR.relative_path_from(BASEDIR).to_s
 	gem.executables       = BIN_FILES.select {|pn| File.executable?(pn) }.