summaryrefslogtreecommitdiff
path: root/enc/make_encmake.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-24 03:49:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-24 03:49:56 +0000
commit8d292a08dfb79ec9a55673eb570f1c5128cc47ec (patch)
tree5116fc0a662c3359a13e56336fed988a14ca9270 /enc/make_encmake.rb
parent7c45c615819e9d8bb8fb947ec972e48cd45d561d (diff)
* Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify
compiled output file name explicitly. * enc/Makefile.in, enc/depend: now makes compiler to put generated files under directories corresnponding to the each source. enc/trans supported. * enc/make_encmake.rb: evaluates depend file before Makefile.in so that the former can influence to CONFIG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/make_encmake.rb')
-rw-r--r--enc/make_encmake.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/enc/make_encmake.rb b/enc/make_encmake.rb
index 7b03149854..d491b28d6e 100644
--- a/enc/make_encmake.rb
+++ b/enc/make_encmake.rb
@@ -14,16 +14,16 @@ else
BUILTIN_ENCS = []
end
-DEFFILE = (true if CONFIG["DLDFLAGS"].sub!(/\s+-def:\$\(DEFFILE\)\s+/, ' '))
-
-mkin = File.read(File.join($srcdir, "Makefile.in"))
-mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
if File.exist?(depend = File.join($srcdir, "depend"))
erb = ERB.new(File.read(depend), nil, '%')
erb.filename = depend
tmp = erb.result(binding)
- mkin << "\n#### depend ####\n\n" << depend_rules(tmp).join
+ dep = "\n#### depend ####\n\n" << depend_rules(tmp).join
+else
+ dep = ""
end
+mkin = File.read(File.join($srcdir, "Makefile.in"))
+mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
open(ARGV[0], 'wb') {|f|
- f.puts mkin
+ f.puts mkin, dep
}