summaryrefslogtreecommitdiff
path: root/tool/compile_prelude.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-17 08:47:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-17 08:47:28 +0000
commitb2d9f1e9d0da3a0b63e231d5692824368efd80cd (patch)
tree44bd02ed0131bb0b8754c9ff3279d0cc3195d43a /tool/compile_prelude.rb
parent5043ab95ed0fdbdc20a918d8b7b809dbc41bcba1 (diff)
* common.mk (encs): new target to compile external encodings.
* enc/Makefile.in: became a serb template. * enc/make_encmake.rb: creates enc.mk from enc/Makefile.in using serb. * lib/mkmf.rb (relative_from): moved from ext/extmk.rb. * lib/mkmf.rb ($extmk): true if under to top source directory, not only ext. * lib/mkmf.rb (depend_rules): extracted from create_makefile. * tool/serb.rb (serb): splitted from tool/compile_prelude.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/compile_prelude.rb')
-rw-r--r--tool/compile_prelude.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb
index e792b77..6a8d9e1 100644
--- a/tool/compile_prelude.rb
+++ b/tool/compile_prelude.rb
@@ -54,23 +54,7 @@ lines_list = preludes.map {|filename|
[setup_lines, lines]
}
-def serb(str, var)
- result = ''
- str.each_line {|line|
- if /\A!/ =~ line
- result << $'
- else
- line.split(/(<%.*?%>)/).each {|x|
- if /\A<%(.*)%>\z/ =~ x
- result << "#{var} << (#{$1}).to_s\n"
- else
- result << "#{var} << #{x.dump}\n"
- end
- }
- end
- }
- result
-end
+require 'tool/serb'
tmp = ''
eval(serb(<<'EOS', 'tmp'))