diff --git a/Cabal-hooks/src/Distribution/Simple/SetupHooks.hs b/Cabal-hooks/src/Distribution/Simple/SetupHooks.hs index da928ad82a9..683332715a0 100644 --- a/Cabal-hooks/src/Distribution/Simple/SetupHooks.hs +++ b/Cabal-hooks/src/Distribution/Simple/SetupHooks.hs @@ -432,8 +432,10 @@ Note that 'SetupHooks' can be monoidally combined, e.g.: * Per-component post-build hooks. - These can be thought of as "pre-linking hooks" and allow injecting - additional data into the final executable. + These run after a component has been built, i.e. after compilation + and linking, and allow post-processing of the resulting build + artifacts: injecting additional data into the final executable, + stripping or signing it, or running a freshly built executable. * The install phase, via 'InstallHooks'. diff --git a/doc/how-to-use-setup-hooks.rst b/doc/how-to-use-setup-hooks.rst index 6036509761a..d05a762baab 100644 --- a/doc/how-to-use-setup-hooks.rst +++ b/doc/how-to-use-setup-hooks.rst @@ -84,7 +84,10 @@ build system. The following hooks exist: * Pre-build rules. Used to define code generators or custom preprocessors, i.e. rules to generate source files. - * Post-build hook. Used before linking to inject data into build artifacts. + * Post-build hook. Runs once a component has been built, i.e. after + compilation and linking. Used to post-process the build artifacts, e.g. + to inject data into a freshly built executable, strip it, sign it, or + run it. * Hooks into the install phase (per component). These are used to copy over extra files when installing an executable.