x
This commit is contained in:
34
Makefile
34
Makefile
@ -1,26 +1,39 @@
|
|||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
all: install check build
|
all: install check build
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# INSTALL
|
# INSTALL
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
export WINDOWS := true
|
|
||||||
ifndef MSYSTEM
|
export WINDOWS := true
|
||||||
export POWERSHELL := true
|
|
||||||
endif
|
ifndef MSYSTEM
|
||||||
|
|
||||||
|
export POWERSHELL := true
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef WINDOWS
|
ifdef WINDOWS
|
||||||
CARGO ?= $(USERPROFILE)/.cargo/bin/cargo.exe
|
|
||||||
WASM_PACK ?= $(USERPROFILE)/.cargo/bin/wasm-pack.exe
|
CARGO ?= $(USERPROFILE)/.cargo/bin/cargo.exe
|
||||||
|
|
||||||
|
WASM_PACK ?= $(USERPROFILE)/.cargo/bin/wasm-pack.exe
|
||||||
|
|
||||||
else
|
else
|
||||||
CARGO ?= $(shell which cargo || echo ~/.cargo/bin/cargo)
|
|
||||||
WASM_PACK ?= $(shell which wasm-pack || echo ~/.cargo/bin/wasm-pack)
|
CARGO ?= $(shell which cargo || echo ~/.cargo/bin/cargo)
|
||||||
|
|
||||||
|
WASM_PACK ?= $(shell which wasm-pack || echo ~/.cargo/bin/wasm-pack)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: node_modules/.package-lock.json $(CARGO) $(WASM_PACK) ## Install dependencies
|
|
||||||
|
### Install dependencies
|
||||||
|
install: node_modules/.package-lock.json $(CARGO) $(WASM_PACK)
|
||||||
|
|
||||||
node_modules/.package-lock.json: package.json package-lock.json
|
node_modules/.package-lock.json: package.json package-lock.json
|
||||||
npm prune
|
npm prune
|
||||||
@ -40,7 +53,6 @@ else
|
|||||||
npm run install:wasm-pack:sh
|
npm run install:wasm-pack:sh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# BUILD
|
# BUILD
|
||||||
|
|
||||||
CARGO_SOURCES := rust/.cargo/config.toml $(wildcard rust/Cargo.*) $(wildcard rust/**/Cargo.*)
|
CARGO_SOURCES := rust/.cargo/config.toml $(wildcard rust/Cargo.*) $(wildcard rust/**/Cargo.*)
|
||||||
|
|||||||
Reference in New Issue
Block a user