Created
December 8, 2008 00:24
-
-
Save llatzhar/33287 to your computer and use it in GitHub Desktop.
rakefile for delphi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake/clean' | |
def win_sh(cmd) | |
`#{cmd}`.each do |l| | |
/\((\d*)\)/ =~ l.gsub!(' | |
','') | |
if $& == nil | |
puts l | |
else | |
puts "#{$`}:#{$1}:#{$'}" | |
end | |
end | |
end | |
compiler = "dcc32 -Q -W -H " | |
imports = [] | |
imports << "c:\\program files\\borland\\delphi7\\imports" | |
imports << "d:\\genki\\GisClient\\Lib" | |
dpr = "HogeHoge.dpr" | |
exe = "HogeHoge.exe" | |
task :default => exe | |
CLEAN.include("**/*.dcu", exe) | |
task exe => [dpr] do |t| | |
units = "" | |
imports.each do |u| | |
units += " \"-U#{u}\" " | |
end | |
win_sh "#{compiler} #{units} #{dpr}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment