properly export NIMBLE_DIR in Makefile

This commit is contained in:
Ivan Folgueira Bande 2026-02-23 02:11:10 +01:00
parent 9e41189abf
commit dc30c6d8f0
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7

View File

@ -75,12 +75,18 @@ clean:
build:
mkdir -p build
ifeq ($(OS),Windows_NT)
NIMBLE_DIR ?= $(USERPROFILE)/.nimble
else
NIMBLE_DIR ?= $(HOME)/.nimble
endif
export NIMBLE_DIR
nimble:
echo "Inside nimble target, checking for nimble..." && \
which nimble >/dev/null 2>&1 || { \
command -v nimble >/dev/null 2>&1 || { \
mv nimbledeps nimbledeps_backup 2>/dev/null || true; \
echo "choosenim not found, installing into $(NIMBLE_DIR)..."; \
export NIMBLE_DIR="$(NIMBLE_DIR)"; \
curl -sSf https://nim-lang.org/choosenim/init.sh | sh; \
mv nimbledeps_backup nimbledeps 2>/dev/null || true; \
}