From 7d46a35e024b5ced5f892a4d5a60f237d1ced2a7 Mon Sep 17 00:00:00 2001 From: Zachary Goff-Hodges Date: Tue, 4 Feb 2025 05:12:57 -0800 Subject: [PATCH] GNUmakefile: add support for 'CARGO_TARGET_DIR' enviroment variable --- GNUmakefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index a8db31b91..b49711569 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -41,7 +41,11 @@ PROG_PREFIX ?= # This won't support any directory with spaces in its name, but you can just # make a symlink without spaces that points to the directory. BASEDIR ?= $(shell pwd) +ifdef CARGO_TARGET_DIR +BUILDDIR := $(CARGO_TARGET_DIR)/${PROFILE} +else BUILDDIR := $(BASEDIR)/target/${PROFILE} +endif PKG_BUILDDIR := $(BUILDDIR)/deps DOCSDIR := $(BASEDIR)/docs