mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
73ef548c63
git-subtree-dir: mrbgems/mruby-socket git-subtree-mainline:d75266dd1bgit-subtree-split:ab54185005
18 lines
256 B
Ruby
Executable File
18 lines
256 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
Dir.chdir(File.dirname($0))
|
|
|
|
f = File.open("const.cstub", "w")
|
|
|
|
IO.readlines("const.def").each { |name|
|
|
name.sub(/^#.*/, "")
|
|
name.strip!
|
|
next if name.empty?
|
|
|
|
f.write <<CODE
|
|
#ifdef #{name}
|
|
define_const(#{name});
|
|
#endif
|
|
CODE
|
|
}
|