Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build script="make all" no longer works #341

Closed
MarkWieczorek opened this issue Jan 21, 2021 · 5 comments
Closed

build script="make all" no longer works #341

MarkWieczorek opened this issue Jan 21, 2021 · 5 comments

Comments

@MarkWieczorek
Copy link

About a year ago, I was able to compile of complex project of mine using a pre-existing Makefile. After finding out about the environment variables $BUILD_DIR and $FC, this was pretty easy, I only needed to specify the following:

[library]
build-script = "make all F95=$FC LIBPATH=$BUILD_DIR MODPATH=$BUILD_DIR"

However, I just updated to the latest alpha version (0.1.3), and this does't seem to work anymore: the makefile is not being executed and instead fpm is trying to compile the file in the src directory.

Is there a way to specify using a prexisting makefile, or a way pass optional variables to the Makefile?

@milancurcic
Copy link
Member

Are you using the Haskell (fpm-haskell-0.1.3*) or Fortran (fpm-0.1.3*) client? This is not yet implemented in the latter.

@ivan-pi
Copy link
Member

ivan-pi commented Jan 21, 2021

Hello @MarkWieczorek,

note the build-script was an "experimental" feature available in the bootstrap fpm (the Haskell version). In the meantime a Fortran version of fpm has been built. You can check the manifest reference to see what is available.

Executables for the Haskell version can be found in the assets section of the latest release.

A specification for the build-script feature is currently under discussion in #249.

@MarkWieczorek
Copy link
Author

I'm using the Fortran client. Should the Haskell version be the default? or is the plan to make the Fortran version the default?

So, I am guessing the answer is: Check back later

That's fine with me. However, I just want to emphasize that if you want old, or complicated projects to work with fpm, eventually, you will need to pass environment variables to the makefile!

@ivan-pi
Copy link
Member

ivan-pi commented Jan 21, 2021

The Fortran version is (and will remain) the default. The build script is just one of the features which hasn't been implemented yet in the Fortran version.

@LKedward
Copy link
Member

Thanks for the feedback @MarkWieczorek. Support for a custom build script is one of two (big) priority items remaining in our milestone . I'll close this issue as a duplicate of #219.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants