I use waf (http://code.google.com/p/waf/) to build a fortran library (which also uses some c-code).
The corresponding wscript looks like this:
def build(bld):
bld(
features = 'fc',
source = 'fortran_interface.f90',
target = 'fortran_interface.o')
#install_path = '${PREFIX}/mod')
#bld.install_files('${PREFIX}/mod','fortran_interface.mod')
bld(
features = 'c',
includes = '../../include',
source = 'init_wrapper.c',
target = 'init_wrapper.o')
bld(
features = 'fc fcstlib',
use = 'init_wrapper.o fortran_interface.o',
target = 'fortran_interface',
install_path = '${PREFIX}/lib')
The call waf produces looks like this:
fc: src/fortran/fortran_interface.f90 ->
build/src/fortran/fortran_interface.f90.1.o
build/fortran_interface.mod
I want to be able to install the .mod
file to ${PREFIX}/mod
.
I tried install_path
which has no effect in this case, or install_files which does not work because a) it doesn't look inside the build/ directory and b) because it complains before the building if a file is not present.3