Does the Cabal have a default target?
If my .cabal file has multiple executables, I can highlight it to build by typing the name
cabal build myExecutable
But I'm lazy and I only want to type
cabal build
for the default target (I can handle extra input characters for my secondary executables).
Is it possible? (I have been searching and reviewing the bondage manual for a long time ... There is no definitive answer yet).
I have to do this, for example, 1000 times a day ....
+3
source to share
2 answers
You can hack something along with flags like:
flag all
default: False
executable first-prog:
buildable: True
executable second-prog
if flag(all)
buildable: True
else
buildable: False
executable third-prog:
if flag(all)
buildable: True
else
buildable: False
and then use cabal configure -fall; cabal build
when you want to create everything.
+2
source to share