diff options
author | Jean-Sébastien Pédron <[email protected]> | 2025-07-07 19:18:09 +0200 |
---|---|---|
committer | Jean-Sébastien Pédron <[email protected]> | 2025-07-22 17:24:42 +0200 |
commit | 62cc6143ef0705767c45271b0ba3f7dcdbae7b1b (patch) | |
tree | 1e8fdae34084347ef654f7f1fc26d120de1d32eb | |
parent | 2352ec359ecb10d2de93ebf14abc394bdab788df (diff) | |
download | erlang.mk-62cc6143ef0705767c45271b0ba3f7dcdbae7b1b.tar.gz erlang.mk-62cc6143ef0705767c45271b0ba3f7dcdbae7b1b.tar.bz2 erlang.mk-62cc6143ef0705767c45271b0ba3f7dcdbae7b1b.zip |
test/core_elixir.mk: Specify CFLAGS when building the Elixir NIF
On FreeBSD, libsodium's `sodium.h` header is installed in
`/usr/local/local`. The Makefile already adds
`/usr/local/include/sodium` to the compiler's `-I` search path, but it
doesn't cover the FreeBSD case.
This patch adds `-I /usr/local/include` to the CFLAGS on the make(1)
command line to let libsalty2's Makefile pick it up. This fixes the
build on FreeBSD.
-rw-r--r-- | test/core_elixir.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/core_elixir.mk b/test/core_elixir.mk index 920b5cb..8c25964 100644 --- a/test/core_elixir.mk +++ b/test/core_elixir.mk @@ -297,8 +297,12 @@ ifdef LEGACY $t perl -ni.bak -e 'print;if ($$.==7) {print "\t\tlibsalty2,\n"}' $(APP)/src/$(APP).app.src endif +# Specify CFLAGS when building the Elixir NIF. On FreeBSD, libsodium's +# `sodium.h` header is installed in `/usr/local/local`. The Makefile already +# adds `/usr/local/include/sodium` to the compiler's `-I` search path, but it +# doesn't cover the FreeBSD case. $i "Build the application" - $t $(MAKE) -C $(APP) $v + $t $(MAKE) -C $(APP) $v CFLAGS=-I/usr/local/include $i "Check that the application was compiled correctly" $t $(ERL) -pa $(APP)/ebin/ -pa $(APP)/deps/*/ebin -pa $(dir $(shell elixir -e 'IO.puts(:code.lib_dir(:elixir))'))/*/ebin -eval " \ |