Skip to content

fobos intrinsic rules get output name

Stefano Zaghi edited this page Mar 12, 2015 · 1 revision

This intrinsic rule is useful for getting the actual output file name (of the specified target) that results by the options defined into the fobos file. As a matter of facts, the output name of the target depends on some options and it is not straightforward to infer it from fobos file. As an example, let us assume our fobos file is

[default]
...
build_dir = exes/
target = src/foo.f90
mklib = shared
...

Because the output option is not set, the output file name is built by means of the other options, i.e. build_dir = exes/ means the file is placed into exes/, target = src/foo.f90 means the base-name is foo, mklib = shared means the extension is .so, consequently

FoBiS.py rule -get_output_name

will produce exes/foo.so

Clone this wiki locally