ci: build libjerboa_native cdylib for interpreter tests when uncached

ober

7a1f8143bf745131c2aa5e4ff160fc3428165562

diff --git a/Makefile b/Makefile
index f0e8619..8aca524 100644
--- a/Makefile
+++ b/Makefile
@@ -14,13 +14,18 @@ JEXEC       := $(JERBUILD) exec --libdirs $(CURDIR)/scheme:$(JH)/lib
 # ./lib/libjerboa_native.* (CWD-relative), so stage a symlink there from where
 # jerbuild built it (its cache, after `make binary`) or a sibling jerboa checkout.
 SOEXT := $(if $(filter Darwin,$(shell uname -s)),dylib,so)
-NATIVE_SRC := $(firstword $(wildcard \
-  $(JH)/jerboa-native-rs/target/release/libjerboa_native.$(SOEXT) \
-  $(CURDIR)/../jerboa/lib/libjerboa_native.$(SOEXT)))
+# `make binary` links the static archive from a temp dir and leaves no shared
+# lib behind, so build the cdylib from jerbuild's bundled crate if it isn't
+# already cached, then symlink it where native-rust probes (./lib, CWD-relative).
 lib/libjerboa_native.$(SOEXT):
 	@mkdir -p lib
-	@if [ -n "$(NATIVE_SRC)" ]; then ln -sf "$(NATIVE_SRC)" $@ && echo "staged $@ -> $(NATIVE_SRC)"; \
-	else echo "note: libjerboa_native.$(SOEXT) not found yet (run 'make binary' first); crypto tests may fail"; fi
+	@src="$(JH)/jerboa-native-rs/target/release/libjerboa_native.$(SOEXT)"; \
+	 if [ ! -f "$$src" ] && [ -f "$(JH)/jerboa-native-rs/Cargo.toml" ]; then \
+	   echo "building libjerboa_native via cargo (one-time)..."; \
+	   cargo build --release --manifest-path "$(JH)/jerboa-native-rs/Cargo.toml"; \
+	 fi; \
+	 if [ -f "$$src" ]; then ln -sf "$$src" "$@" && echo "staged $@ -> $$src"; \
+	 else echo "note: libjerboa_native.$(SOEXT) unavailable; crypto tests may fail"; fi
 
 .PHONY: all build binary run test test-keymap test-minibuffer test-commands test-keys test-nav test-hint test-pass test-polish test-securestore test-adblock test-gui test-buffers repl clean help
 .DEFAULT_GOAL := help