Skip to content

Commit 7d46a35

Browse files
zcg00RenjiSann
authored andcommitted
GNUmakefile: add support for 'CARGO_TARGET_DIR' enviroment variable
1 parent d31a19f commit 7d46a35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

GNUmakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ PROG_PREFIX ?=
4141
# This won't support any directory with spaces in its name, but you can just
4242
# make a symlink without spaces that points to the directory.
4343
BASEDIR ?= $(shell pwd)
44+
ifdef CARGO_TARGET_DIR
45+
BUILDDIR := $(CARGO_TARGET_DIR)/${PROFILE}
46+
else
4447
BUILDDIR := $(BASEDIR)/target/${PROFILE}
48+
endif
4549
PKG_BUILDDIR := $(BUILDDIR)/deps
4650
DOCSDIR := $(BASEDIR)/docs
4751

0 commit comments

Comments
 (0)