class Main $VERBOSE = nil #ENV["RUBYOPT"] = "-W0" require "rbconfig" require "fileutils" include FileUtils Makefile = <<-txt all: \t@ruby -e 42 clean: \t@ruby -e 42 install: \t@ruby -e 42 txt def initialize setup gen_makefile install_private_sqlite install_private_sqlite_ruby install_gem "posixlock" install_gem "arrayfields" install_gem "lockfile" end def setup @config = Config::CONFIG @prefix = File.dirname(File.expand_path(__FILE__)) Dir.chdir @prefix puts "-->> #{ Dir.pwd }" @libdir = File.join @prefix, "lib" @alldir = File.join @prefix, "all" @srcdir = File.join @alldir, "packages" @rqlibdir = Dir["#{ @libdir }/rq-*"].detect{|e| test ?d, e} @local = File.join @rqlibdir, "local" @arch = @config["sitearch"] || @config["arch"] @archdir = File.join @rqlibdir, @arch FileUtils.mkdir_p @local FileUtils.mkdir_p @archdir @ld_library_path = File.join @local, "lib" @ld_run_path = File.join @local, "lib" #ENV["LD_LIBRARY_PATH"] = "" #@ld_library_path ENV["LD_RUN_PATH"] = "" @srcs = Dir["#{ @srcdir }/*"] @ruby = File::join(@config['bindir'], @config['ru