#---------- programs and config variables ----------
-CARGO ?= cargo $(RUST_VERSION)
TARGET_DIR ?= target
USVG_OPTIONS = "--sans-serif-family=DejaVu Sans"
ifneq (,$(wildcard ../Cargo.nail))
NAILING_CARGO ?= nailing-cargo
-CARGO = $(NAILING_CARGO) $(RUST_VERSION)
+CARGO_CMD ?= $(NAILING_CARGO)
BUILD_SUBDIR ?= ../Build
TARGET_DIR = $(BUILD_SUBDIR)/$(notdir $(PWD))/target
$(abspath $(BUILD_SUBDIR)/$(notdir $(PWD)))
else
+CARGO_CMD ?= cargo
clean-nailing:
endif # Cargo.nail
# ? But maybe it doesn't matter since we're very conservative and
# only pass JsValue and a few strings across the WASM ABI.
+CARGO = $(CARGO_CMD) $(RUST_VERSION)
+
#---------- toplevel aggregate targets ----------
check: stamp/cargo.debug-check at wdt jstest
$(NAILING_CARGO_JUST_RUN) touch $(abspath $@)
stamp/cargo.wasm-bindgen: $(call rsrcs, ! -name \*.rs)
- $(CARGO) $(WASM_BINDGEN_CLI_CARGO_OPTS) build --target-dir=target \
+ $(CARGO_CMD) $(WASM_BINDGEN_CLI_CARGO_OPTS) $(CARGO_VERSION) \
+ build --target-dir=target \
--manifest-path=$(abspath wasm/Cargo.toml) -p wasm-bindgen-cli
$(stamp)