I modified my rake.rb to support this via an additional command that specified subdirectories to get added to a queue. Rake then iterates through this queue loading the rakefiles and executing them [clearing out all tasks between]. It doesn't work like make either, where people frequently recursively launch new copies of make for each makefile. Obviously, that would be horribly inefficient.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Leon Yeh > Sent: Friday, December 02, 2005 5:54 PM > To: [email protected] > Subject: [Rake-devel] Multiple Rakefile build > > Hi All, I have just started using Rake, I usually use ant, > but got caught the Ruby fever :-) > > I have been using RoR for web development and in need rake to > do data migration. I wanted to build a hirarchical build > system similar to Makefile. Example below > > > \database_migration > Rakefile > \task_migrate_empTable > Rakefile > drop_empTable.rb > create_empTable.rb > .. > \task_migrate_salesTable > Rakefile > drop_salesTable.rb > create_salesTable.rb > > > > What I want to do is that the top-level Rakefile go thru the > folders and > invoke each of Rakefile. Below is my first rakefile, but it > was not working. What is the correct way to do this ? Any > help are greatly appreciated. > > require 'rake' > > > desc "Migrate Employee Table" > task :employeeTbl do > cd "task_empTbl" > Rake.application.load_rakefile() > Rake.application.run() > cd "../" > end > > task :default => [ > :distributorTbl, > :employeeTbl > ] > > > Thanks in advance > Leon Yeh > _______________________________________________ > Rake-devel mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/rake-devel > _______________________________________________ Rake-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/rake-devel
