ocaml / ocaml/dune

Improve installation of C headers for foreign archive sandboxes

Open
#3,355 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

c-bindings
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

It would be nice if there were an easier way to install the C headers than having to list all of them.

My use-case is that I'm wrapping the build of a (rather complex) C library inside a foreign archive sandbox. It's working fine, but then I need to list all the C headers to install manually:

  • as targets of the build rule for the archive;
  • either as install_c_headers or in a custom install stanza.

It would be easier if I could use globs, or specify a directory in both cases. Especially since that list might change depending on system parameters, e.g. the host OS. (e.g. a related issue is #3354 which could solve the second item but not the first one)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the build rules for archive targets and the install_c_headers or custom install stanzas described in the issue. Determine how header lists are currently expanded and define support for selecting headers by glob or directory in both contexts; done means the sandbox can install the required headers without listing each file manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ocaml
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.