@@ -2869,9 +2869,10 @@ Declaring a ``custom-setup`` stanza also enables the generation of
28692869 :synopsis: Build information for ``Custom `` and ``Hooks `` build types
28702870 :since: 1.24
28712871
2872- The :pkg-section: `custom-setup ` stanza contains information needed
2873- for the compilation of custom ``Setup.hs `` scripts as well as for
2874- ``SetupHooks.hs `` hooks modules.
2872+ A :pkg-section: `custom-setup ` stanza is required for
2873+ :pkg-field: `build-type ` ``Custom `` and will be ignored (with a warning) for
2874+ other build types. The stanza contains information needed for the compilation
2875+ of custom ``Setup.hs `` scripts or ``SetupHooks.hs `` hooks modules. For example:
28752876
28762877::
28772878
@@ -2904,7 +2905,7 @@ Backward compatibility and ``custom-setup``
29042905
29052906Versions prior to Cabal 1.24 don't recognise ``custom-setup `` stanzas,
29062907and will behave agnostic to them (except for warning about an unknown
2907- section). Consequently, versions prior to Cabal 1.24 can't ensure the
2908+ ' section' ). Consequently, versions prior to Cabal 1.24 can't ensure the
29082909declared dependencies ``setup-depends `` are in scope, and instead
29092910whatever is registered in the current package database environment
29102911will become eligible (and resolved by the compiler) for the
@@ -2914,8 +2915,9 @@ The availability of the
29142915``MIN_VERSION_package_(A,B,C) `` CPP macros
29152916inside ``Setup.hs `` scripts depends on the condition that either
29162917
2917- - a ``custom-setup `` section has been declared (or ``cabal build `` is being
2918- used which injects an implicit hard-coded ``custom-setup `` stanza if it's missing), or
2918+ - a ``custom-setup `` stanza has been declared (or ``cabal build `` is being used
2919+ which injects an implicit hard-coded ``custom-setup `` stanza if it's missing),
2920+ or
29192921- GHC 8.0 or later is used (which natively injects package version CPP macros)
29202922
29212923Consequently, if you need to write backward compatible ``Setup.hs ``
0 commit comments