Skip to content

Allow pre-build rules to generate extra source files #11607

@sheaf

Description

@sheaf

Currently, pre-build rules in build-type: Hooks packages can only really generate Haskell files, because the logic for determining which rules are demanded (and will thus be run) considers that the only root demands are autogenerated Haskell files.

As there is no equivalent to autogenerated modules for extra-sources, I propose to simply consider any "c-sources"/"js-sources"/etc that are in the autogen directory (added in a pre-configure hook) additional demands.

Note that this doesn't work for things like .h files, because they are needed at configure time, so cannot be generated in a pre-build hook if they are declared under includes/autogen-includes.

Several people have asked for this feature, with the latest example being this Reddit post.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions