From ebfd903b81156a27ddce823fbb03ce33f81a93fe Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 8 Jul 2020 00:40:35 +0100 Subject: [PATCH] works --- Makefile | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index a181e0dd..37f819ad 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,32 @@ #!/bin/sh +# +# make -j8 +# make -j8 release SHELL=/bin/bash CARGO ?= cargo +CARGO_TARGET_DIR ?= target -default: debug - -ifneq (,$(NAILINGCARGO_MANIFEST_DIR)) -vpath % $(NAILINGCARGO_MANIFEST_DIR) -CARGO_FLAGS += $(addprefix --manifest-path=,$(NAILINGCARGO_MANIFEST_DIR)/Cargo.toml) -CARGO_FLAGS += $(NAILINGCARGO_CARGO_OPTIONS) +ifneq (,../Cargo.nail) +CARGO = nailing-cargo +CARGO_TARGET_DIR = ../Build/target endif -foo: - printenv | sort +default: debug + +debug release:: %: $(CARGO_TARGET_DIR)/%/server templates/script.js + @echo Built $@. -debug: target/debug/server templates/script.js +.PHONY: $(CARGO_TARGET_DIR)/%/server -.PHONY: target/debug/server +$(CARGO_TARGET_DIR)/debug/server: + $(CARGO) build -target/debug/server: - $(CARGO) build $(CARGO_FLAGS) +$(CARGO_TARGET_DIR)/release/server: + $(CARGO) build --release templates/script.js: templates/script.ts tsconfig.json - mkdir -p templates - test -f templates || ln -s $< templates/ tsc --outfile $@.tmp 2>&1 \ | perl -pe 's/\((\d+),(\d+)\):/:$$1:$$2:/'; \ test "$${PIPESTATUS[*]}" = "0 0" -- 2.30.2