Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Regenerate .cabal.in files when changed #416

Closed
bgamari opened this issue Sep 19, 2017 · 2 comments
Closed

Regenerate .cabal.in files when changed #416

bgamari opened this issue Sep 19, 2017 · 2 comments

Comments

@bgamari
Copy link
Collaborator

bgamari commented Sep 19, 2017

One of the annoyances that I have felt with the current Make-based build system is the inability for it to rebuild ghc.cabal when ghc.cabal.in is changed. Instead one must re-run configure, which results in all sort of spurious changes, generally requiring a full rebuild. Doing this every time a module is added, removed, or renamed gets quite tiresome. For this reason I generally just resort to updating ghc.cabal by hand.

I suspect it wouldn't be that hard to teach Hadrian to do the same sort of substitution that autoconf performs, eliminating the need for a full re-configure.

@snowleopard
Copy link
Owner

snowleopard commented Sep 19, 2017

I looked at ghc.cabal.in and I can see only two variables that are substituted by configure:

  • @ProjectVersionMunged@
  • @FFIIncludeDir@

Both values are known to Hadrian, so we can indeed do the substitution ourselves.

I think this may end up being generally useful, as there are also files like ghc-bin.cabal.in, ghci.cabal.in, prologue.txt.in, index.html.in, plus a few other that don't require a lot of substitutions.

@snowleopard
Copy link
Owner

This seems to be a duplicate of #655.

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

No branches or pull requests

2 participants