diff --git a/ChangeLog b/ChangeLog index 19b9178dc4..338c555514 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Mar 22 09:51:29 2015 Nobuyoshi Nakada + + * tool/make-snapshot (package): substitute configuration variables + in Makefile.in instead of passing by the command line, and make + temporary Makefile instead of a pipe. + Sun Mar 22 08:09:47 2015 Nobuyoshi Nakada * common.mk (ext/ripper/ripper.c, ext/rbconfig/sizeof/sizes.c): diff --git a/tool/make-snapshot b/tool/make-snapshot index 2743743f58..c6782ea647 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -288,26 +288,36 @@ def package(vcs, rev, destdir, tmp = nil) File.open("#{defaults}/ruby.rb", "w") {} miniruby = ENV['MINIRUBY'] + " -I. -I#{extout} -rcross" baseruby = ENV["BASERUBY"] - mk = IO.read("Makefile.in").gsub(/^@.*\n/, '').gsub(/@([A-Za-z_]\w*)@/) {ENV[$1]} + mk = IO.read("Makefile.in").gsub(/^@.*\n/, '') + vars = { + "srcdir"=>".", + "CHDIR"=>"cd", + "NULLCMD"=>":", + "PATH_SEPARATOR"=>File::PATH_SEPARATOR, + "IFCHANGE"=>"tool/ifchange", + "MKDIR_P"=>"mkdir -p", + "RMALL"=>"rm -fr", + "MINIRUBY"=>miniruby, + "RUNRUBY"=>miniruby, + "RUBY"=>ENV["RUBY"], + "HAVE_BASERUBY"=>"yes", + "BASERUBY"=>baseruby, + "BOOTSTRAPRUBY"=>baseruby, + "PWD"=>Dir.pwd, + } + mk.gsub!(/@([A-Za-z_]\w*)@/) {vars[$1] || ENV[$1]} mk << commonmk.gsub(/(?