Skip to content

Commit

Permalink
dune: also emit LDFLAGS into libs.sexp
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Mar 6, 2024
1 parent 26b8cf7 commit 9ce675c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
(bash "cat Makefile | sed -n -e 's/CFLAGS=//p'")
(bash "echo -n ')'")))))

; Note that the order (LDFLAGS, then LIBS) is important below since
; zarith uses pkg-config to detect gmp, and adds the output to LIBS
; but we like -L ..._build/solo5/duniverse/Zarith/../../../install/solo5/lib/gmp
; first, followed by -L/usr/local/lib -lgmp (from pkg-config)

(rule
(target libs.sexp)
(deps Makefile)
Expand All @@ -73,6 +78,7 @@
%{target}
(progn
(bash "echo -n '('")
(bash "cat Makefile | sed -n -e 's/LDFLAGS=//p'")
(bash "cat Makefile | sed -n -e 's/LIBS=//p'")
(bash "echo -n ')'")))))

Expand Down

0 comments on commit 9ce675c

Please sign in to comment.