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

Andrew Chen hangfei at gmail.com
Wed Jan 16 19:06:18 EST 2008

Assaf and all rake guys,

Thanks, that works!

I just released FRUIT, a FORTRAN unit testing framework on
sourceforge. (https://sourceforge.net/projects/fortranxunit/)

The FORTRAN stuff was not exciting, but those 2 points are worth mentioning:

1. Rake is really a flexible build system.  It can handle many things
over make file, such as handling generated source codes.  It is
astonishing to compare the size of rakefile and makefile (about 30
lines vs. 500 lines).  I used one technique of rake_base, so that all
common tasks are defined in this file, and each rakefile includes it.

2. I implemented rSpec features in FORTRAN, that is pretty cool :-)
So that someone who have to do FORTRAN can make TDD, and executable

~Andrew Chen

> # Determine all the .o files from the .f90 files.
> objs = FileList['*.f90'].map { |f| f.ext('o') }
> # Depends on everything but itself.
> file('fruit_basket.f90'=>objs - ['fruit_basket.o'])

More information about the Rake-devel mailing list