Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
rake and implicit dependencies
Brad Phelan
7/26/2007 8:20:00 AM
I am playing with Rake to build c projects and I run into this problem
#########
task :default => ['main.out']
file 'main.out'
rule '.out' => ['.o'] do |t|
sh "cc #{t.source} -o #{t.name}"
end
rule '.o' => ['.c'] do |t|
sh "cc #{t.source} -c -o #{t.name}"
end
#########
fails with the error
in /home/phelan/ruby/rake)
cc main.o -o main.out
cc: main.o: No such file or directory
cc: no input files
rake aborted!
Command failed with status (1): [cc main.o -o main.out...]
/home/phelan/ruby/rake/rakefile.rb:6
(See full trace by running task with --trace)
but the following works fine
task :default => ['main.out']
# file 'main.out'
rule '.out' => ['.o'] do |t|
sh "cc #{t.source} -o #{t.name}"
end
rule '.o' => ['.c'] do |t|
sh "cc #{t.source} -c -o #{t.name}"
end
Where is the subtlety that I am missing here?
--
Brad Phelan
http://xt...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
rake and implicit dependencies
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password