15 lines
310 B
Ruby
15 lines
310 B
Ruby
Rscons::Environment.new do |env|
|
|
env.build_root = "build"
|
|
tempdir = ENV["TEMP"] || ENV["TMP"] || "/tmp"
|
|
source_file = File.join(tempdir, "abs.c")
|
|
File.open(source_file, "w") do |fh|
|
|
fh.puts(<<-EOF)
|
|
int main()
|
|
{
|
|
return 29;
|
|
}
|
|
EOF
|
|
end
|
|
env.Program("abs.exe", source_file)
|
|
end
|