@@ -2869,9 +2869,10 @@ Declaring a ``custom-setup`` stanza also enables the generation of
2869
2869
:synopsis: Build information for ``Custom `` and ``Hooks `` build types
2870
2870
:since: 1.24
2871
2871
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:
2875
2876
2876
2877
::
2877
2878
@@ -2904,7 +2905,7 @@ Backward compatibility and ``custom-setup``
2904
2905
2905
2906
Versions prior to Cabal 1.24 don't recognise ``custom-setup `` stanzas,
2906
2907
and 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
2908
2909
declared dependencies ``setup-depends `` are in scope, and instead
2909
2910
whatever is registered in the current package database environment
2910
2911
will become eligible (and resolved by the compiler) for the
@@ -2914,8 +2915,9 @@ The availability of the
2914
2915
``MIN_VERSION_package_(A,B,C) `` CPP macros
2915
2916
inside ``Setup.hs `` scripts depends on the condition that either
2916
2917
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
2919
2921
- GHC 8.0 or later is used (which natively injects package version CPP macros)
2920
2922
2921
2923
Consequently, if you need to write backward compatible ``Setup.hs ``
0 commit comments