summaryrefslogtreecommitdiffstats
path: root/tool/Makefile
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2018-09-08 11:50:11 +0200
committerNeal H. Walfield <neal@pep.foundation>2018-09-08 13:01:57 +0200
commit50e5ecba26948eefbbc058bc4a47205a429453cf (patch)
tree2d65b2a11e9b5f84366624d0eda14dc61aebcb6f /tool/Makefile
parent7bac8e4fed5eccbdc04f48ef5d946c5da2613ec4 (diff)
Change Makefiles to support CARGO_TARGET_DIR.
- Also use 'cargo clean' instead of 'rm -rf $(CARGO_TARGET_DIR)' in case $(CARGO_TARGET_DIR) is incorrectly set.
Diffstat (limited to 'tool/Makefile')
-rw-r--r--tool/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/tool/Makefile b/tool/Makefile
index 7cd3bd1f..bd601b00 100644
--- a/tool/Makefile
+++ b/tool/Makefile
@@ -1,6 +1,9 @@
CARGO ?= cargo
-SQ ?= ../target/debug/sq
-SQV ?= ../target/debug/sqv
+CARGO_TARGET_DIR ?= $(shell pwd)/../target
+# We currently only support absolute paths.
+CARGO_TARGET_DIR := $(abspath $(CARGO_TARGET_DIR))
+SQ ?= $(CARGO_TARGET_DIR)/debug/sq
+SQV ?= $(CARGO_TARGET_DIR)/debug/sqv
all: src/sq-usage.rs src/sqv-usage.rs