-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow non-opam installations #52
Conversation
Makefile: provide rules for flags/libs.tmp and flags/cflags.tmp, clean: rm them .gitignore: ignore remporary generated flags files
pkg-config can take multiple arguments and will combine all dependencies, so no need for any loops and so many intermediate steps.
@hannesm I pushed 7904eee to your branch which simplifies things a bit, AFAICT the outputs are identical. FWIW I'm not too happy about the use of the
construct, since if there are any shell constructs in the output of |
@mato thanks! I did neither write nor merge the echo "(" > flags/libs
env PKG_CONFIG_PATH="$(shell opam config var prefix)/lib/pkgconfig" \
pkg-config $(PKG_CONFIG_DEPS) --libs | sed -e 's!@@PKG_CONFIG_EXTRA_LIBS@@!$(PKG_CONFIG_EXTRA_LIBS)!' >> flags/libs
echo ")" >> flags/libs (but likely there are some superfluous or missing line endings etc.) my initial motivation for this PR that before it with a cloned ocaml-freestanding running I guess, esp. with respect to mirage/mirage#969 (comment) I'm still lacking the overall design of mirage 4, in respect to usage of dune and pkg-config. |
For the Regarding
It looks like we're moving toward a Mirage 4 that depends less and less on opam. According to what's suggested in mirage/mirage#969 (comment), most of the sources need to be locally downloaded instead of being installed with opam. |
IMHO: let's merge this now since it improves development of ocaml-freestanding, and adapt ocaml-freestanding piecewise with mirage4 development if needed. at least if I unerstand @TheLortex correctly, having both pkg-config and libs/cflags helps with the mirage4 development atm. |
@hannesm @TheLortex Does dune interpret |
In other words, is
equivalent to
? |
@mato I don't know. from my experience with |
@hannesm @TheLortex I checked with the dune metadata format doc (https://dune.readthedocs.io/en/latest/project-layout-specification.html#metadata-format) and it does seem that extra whitespace / newlines are not significant in a list, so I've pushed 0bb2f6f to remove the problematic use of |
According to the dune metadata format [1], extra whitespace and newlines are not significant in a list, so remove the fragile use of "cat" from flags/ generation, replacing it with a single invocation of "sed". [1] https://dune.readthedocs.io/en/latest/project-layout-specification.html#metadata-format
i approve this change as it is now. |
Makefile: provide rules for flags/libs.tmp and flags/cflags.tmp, clean: rm them
.gitignore: ignore remporary generated flags files
this improves local non-opam builds after c5bf86c /cc @TheLortex