haskell - Why do cabal configure? -


in cabal user guide says cabal compared autoconf , automake since command line interface configuring , building packages follows same steps steps:

./configure --prefix=... make make install 

compared to

cabal configure --prefix=... cabal build cabal install 

my understanding ./configure uses config file (produced autoconf) adapt make process environment in run , check dependencies. ./configure therefore have "input" conform to. if cabal configure not given arguments do, , why necessary before running cabal build?

the cabal configure step @ least 2 things know of:

  • check package description parses ok.
  • check required dependencies installed (and report error if not).

basically it's running constraint solver decide packages you're going build against. (e.g., if have several versions of bytestring installed, version going use? might depend on version packages depend on expecting...)

also believe it's possible supply options @ configure time change features of package built (but don't have experience this).

i think had call configure before call build, believe cabal command-line tool step automatically in many cases. (e.g., cabal run seems automatically reconfigure if package description file newer configuration db.)


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -