=begin
  pre-setup.rb

  Copyright(c) 2001-2004 Masao Mutoh<mutoh@highway.ne.jp>
  This program is licenced under the same licence as Ruby. 
=end

#
# Configurations
#
racc = `which racc`.chomp
ruby = config("ruby-path")

#
# Create rmsgfmt
#
system("#{racc} -g src/rmsgfmt.ry -o src/rmsgfmt.tmp.rb")

file = open("bin/rmsgfmt", "w")
file.printf("\#!%s\n\n", ruby)
file.print "=begin\n"
file.print <<-EOS
  rmsgfmt - ruby version of msgfmt

  Copyright (C) 2003,2004 Masao Mutoh <mutoh@highway.ne.jp>
 
  You may redistribute it and/or modify it under the same
  license terms as Ruby.
  EOS
file.print "=end\n\n"

file.print open("src/rmsgfmt.tmp.rb").read
file.close
