@@ -2804,8 +2804,10 @@ Declaring a ``custom-setup`` stanza also enables the generation of
2804
2804
:synopsis: Custom Setup.hs build information.
2805
2805
:since: 1.24
2806
2806
2807
- The optional :pkg-section: `custom-setup ` stanza contains information needed
2808
- for the compilation of custom ``Setup.hs `` scripts,
2807
+ A :pkg-section: `custom-setup ` stanza is required for
2808
+ :pkg-field: `build-type ` ``Custom `` and will be ignored (with a warning) for
2809
+ other build types. The stanza contains information needed for the compilation
2810
+ of custom ``Setup.hs `` scripts. For example:
2809
2811
2810
2812
::
2811
2813
@@ -2838,7 +2840,7 @@ Backward compatibility and ``custom-setup``
2838
2840
2839
2841
Versions prior to Cabal 1.24 don't recognise ``custom-setup `` stanzas,
2840
2842
and will behave agnostic to them (except for warning about an unknown
2841
- section). Consequently, versions prior to Cabal 1.24 can't ensure the
2843
+ ' section' ). Consequently, versions prior to Cabal 1.24 can't ensure the
2842
2844
declared dependencies ``setup-depends `` are in scope, and instead
2843
2845
whatever is registered in the current package database environment
2844
2846
will become eligible (and resolved by the compiler) for the
@@ -2848,8 +2850,9 @@ The availability of the
2848
2850
``MIN_VERSION_package_(A,B,C) `` CPP macros
2849
2851
inside ``Setup.hs `` scripts depends on the condition that either
2850
2852
2851
- - a ``custom-setup `` section has been declared (or ``cabal build `` is being
2852
- used which injects an implicit hard-coded ``custom-setup `` stanza if it's missing), or
2853
+ - a ``custom-setup `` stanza has been declared (or ``cabal build `` is being used
2854
+ which injects an implicit hard-coded ``custom-setup `` stanza if it's missing),
2855
+ or
2853
2856
- GHC 8.0 or later is used (which natively injects package version CPP macros)
2854
2857
2855
2858
Consequently, if you need to write backward compatible ``Setup.hs ``
0 commit comments