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

Makefiles now support haskell stack #267

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

drhodes
Copy link

@drhodes drhodes commented Oct 16, 2020

Hi, this pull request enables building the Bluespec toolchain with haskell stack, as was discussed in this issue:

#187

I tested the build on two different debian machines, with and without a system-wide GHC installed using both make install and the new rule make stack-install. make check is passing.

The README has also been updated.

@drhodes
Copy link
Author

drhodes commented Oct 19, 2020

Oops, I wasn't sure if that merge branch commit message was an actual commit. I can close this pull request, squash the two commits and open another pull request.

Base automatically changed from master to main March 16, 2021 05:42
@quark17
Copy link
Collaborator

quark17 commented Dec 7, 2021

Thank you for this. Sorry that there hasn't been any activity on it.

Since this was submitted, the build instructions have been updated to explain how one can build using cabal to install dependencies:

$ cabal v2-install --package-env=default regex-compat syb old-time split
$ make GHC="ghc -package-env default"

I think that we could certainly add a similar mention of how one can build using stack currently:

$ stack install regex-compat syb old-time split
$ make GHC="stack ghc --" NO_DEPS_CHECKS=yes

It would be nice if both of these alternative build methods could be abstracted into the makefile, but I don't think I would do it the way you have proposed. I would need to think on it some more. (Offhand, I might prefer an environment variable like GHC_TYPE= with a fixed set of supported values, like cabal-v2, stack, etc. This could be added to any target, instead of having to create an alternative for each target.)

It would also be nice if the dependency checks did not have to be disabled for stack. The checks are currently done using ghc-pkg, but perhaps the check could be done with a different command when using a different GHC installation type.

However, it may not be worth implementing anything in the makefiles just yet. There is some home that the current makefiles can be replaced by something better (like cmake or something else). Maybe that other system would have a better way to choose between GHC types.

For now, I would be happy with just documenting the make command for building using stack.

@drhodes
Copy link
Author

drhodes commented Dec 7, 2021

Hi, thanks for taking the time to review my pull request. I have a couple looming deadlines at the moment, but I put this on my todo list. About a make alternative .. I haven't used it, but nix has been getting a lot of good press these days, especially from haskellers.

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

Successfully merging this pull request may close these issues.

None yet

2 participants