[Rake-devel] How to execute before the '.o' => '.f90' tasks?

Andrew Chen meihome at gmail.com
Wed Jan 16 13:49:15 EST 2008

Rake experts,

I still have problem to control the exact order of the compilation.

I have a_test.f90, b_test.f90 file.  From those files, I have a
pre-processor, that will generate:
fruit_basket.f90, and fruit_driver.f90 files.

The question is, I want make sure the order of compilation is:
a.f90, b.f90, fruit_basket.f90, and fruit_driver.f90

I used the file tasks:
  rule '.o' => '.f90' do |t|
    sh "#{$compiler} -c -o #{t.name} #{t.source} -module #{$build_dir}
#{lib_name_flag} #{lib_dir_flag}"

Question:  how do I add the rules that will allow names with certain
patterns compiled last?

My working files are located here:
, and http://fortranxunit.cvs.sourceforge.net/fortranxunit/fruit/rake_base.rb

~Andrew Chen

More information about the Rake-devel mailing list