Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Cabal-hooks/src/Distribution/Simple/SetupHooks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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'.

Expand Down
5 changes: 4 additions & 1 deletion doc/how-to-use-setup-hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading