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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -