From: Jim Weirich Date: 2004-08-28T07:14:49+09:00 Subject: Re: Rake Bug jim@freeze.org said: > * Jim Weirich [2004-08-28 05:11:24 +0900]: > >> >> If you want something to be dependent upon the rakefile, then declare >> the >> Rakefile in the dependencies. > > Good idea. So, does the following look like a good way to do this? > > The following: > > file "app" => ["app.o"] do > # link app > end > > file "app.o" => ["main.c", "app.c"] do > # compile app.o > end > > would become: > > file "app" => ["app.o"] do > # link app > end > > file "app.o" => ["main.c", "app.c"] do > # compile app.o > end > > file "app.c" => ["Rakefile"] do |t| > sh "touch #{t.name}" > end > file "main.c" => ["Rakefile"] do |t| > sh "touch #{t.name}" > end Hmmm ... I don't _think_ the touch is needed. The fact that a dependency has a later time _should_ be enough to trigger its rebuild. I won't get a chance to test this until this evening however. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)