[Hackage] #644: Equivalent of autoconf's --without-bla

#644: Equivalent of autoconf's --without-bla ----------------------------+----------------------------------------------- Reporter: Eelis | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- I have a package comprising multiple executables. One of these is optional and has additional dependencies. Because the majority of my users will want to use this executable, I want to build it by default. However, users who do /not/ need it should have the option of turning off building of the executable (removing the need for the additional dependencies). My naive approach to accomplish this with Cabal is as follows: I first declare a flag corresponding to the executable, with a default value of true. I then use: executable theexecutable if flag(theflag) ... else buildable: False This almost does what I need. The problem is that when the user does /not/ have the dependencies needed for the executable, Cabal actually silently sets the flag to false and doesn't build the executable. I realize this is part of some clever backtracking/satisfiability scheme which is undoubtedly useful in certain cases, but in this case it just gets in the way and confuses the hell out of my users who end up missing the executable (because they lacked the additional dependencies). What I really want is for Cabal to keep its paws off this particular flag, so that if the user lacks the dependencies, they get an error (unless they manually unset the flag to inhibit building of the executable). In other words, all I really want is an equivalent of autoconf's --without-bla option. Surely this can't be too hard for Cabal? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/644 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#644: Equivalent of autoconf's --without-bla ----------------------------+----------------------------------------------- Reporter: Eelis | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Resolution: worksforme Keywords: | Difficulty: unknown Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by igloo): * status: new => closed * resolution: => worksforme Comment: You can do this with a Cabal flag, e.g. {{{ flag buildExe description: Should we build the executable? default: True manual: True }}} and then I think it's `--flag -buildExe` if you don't want to build th executable. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/644#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage