Skip to content

Document which programs can be overridden with flags like --with-gcc #7899

@sergv

Description

@sergv

PR is welcome to (see the "Initial description" below if you need more detail on the issue)

  1. inline the list of known programs that you can get from cabal v1-build --help (see the very bottom) into the docs,

  2. add a NOTE on builtinPrograms (

    builtinPrograms :: [Program]
    builtinPrograms =
    [ -- compilers and related progs
    ghcProgram
    , runghcProgram
    , ghcPkgProgram
    , ghcjsProgram
    , ghcjsPkgProgram
    , jhcProgram
    , uhcProgram
    , hpcProgram
    , -- preprocessors
    hscolourProgram
    , doctestProgram
    , haddockProgram
    , happyProgram
    , alexProgram
    , hsc2hsProgram
    , c2hsProgram
    , cpphsProgram
    , -- platform toolchain
    gccProgram
    , arProgram
    , stripProgram
    , ldProgram
    , tarProgram
    , -- configuration tools
    pkgConfigProgram
    ]
    ) to update that place of the docs if this list is updated (I confirmed that what v1-build prints it takes from this list).


Initial description:

I'm unable to locate list of programs for which executables and options can be supplied via e.g. cabal configure --with-gcc=... --with-gcc-options=....

The manual at https://cabal.readthedocs.io/en/latest/setup-commands.html?highlight=--with-prog#cmdoption-runhaskell-Setup.hs-configure-with-prog directs to use cabal install --help. But there's no such info there:

$ cabal --version
cabal-install version 3.7
compiled using version 3.7.0.0 of the Cabal library 
$ cabal install --help
...
 --with-PROG=PATH               give the path to PROG
 --PROG-option=OPT              give an extra option to PROG (no need to quote
                                options containing spaces)
 --PROG-options=OPTS            give extra options to PROG
...

There's mention that it is possible but list of programs is nowhere to be found. For instance,cabal install --help | awk '/gcc|alex/' returns nothing but shouldn't since --with-gcc and --with-alex are accepted options so they should've been mentioned somewhere.

Now, I can find list of programs at ~/.cabal/config but that's probably not the way to do it. Perhaps the list should be enumerated in the Cabal User Guide?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions