Closed ivan-pi closed 3 years ago
I was playing around with gtk-fortran and I found a work-around for non-module sources by renaming them to .in
files so that fpm
ignored them and including them with the include
statement in a module.
It's not ideal and I'm not sure what the plan is for supporting non-module sources but I think they should be supported in some form.
Perhaps the larger question is whether we will make fpm
flexible enough to support legacy packages in their original form or require restructuring of such packages; this latter option is not as extreme as it sounds since for some packages, fpm
support will be brought through a third-party fork anyway (i.e. not via the upstream repo).
At the moment, fpm
is only really targeted at projects with modules. At some point we may support non-module sources, but it may be some time before we get to it.
@LKedward , clever workaround. I may even suggest that as a recommended migration path.
In the mean time, there is always the out that fpm
now supports custom build scripts or Makefiles (with some specific requirements).
We have to support non-module sources. But this might be a feature to put into the Fortran based fpm to keep the Haskell based on minimal to be used in bootstrapping.
I've been trying to get fpm to work with some old-school packages like MINPACK: https://github.com/certik/minpack. These projects are generally just a bunch of fixed format ".f" files. For modern applications that rely on such legacy codes, an interface module is the first step towards safe function calls.
Trying to run
fpm build
on @certik's MINPACK fails with errors akin to:I understand that fpm is expecting to find a module file for each single ".f" file. Is it possible to somehow work around this? The farthest I could get it in the fpm source was to remove to the "-Wimplicit-interface" flag which was creating lots of warnings :see_no_evil: .
Am I right to think fpm is currently most suitable for projects composed of multiple module files?