Skip to content

Commit 2dda1fd

Browse files
committed
Fix BUILDDIR
1 parent 41cffeb commit 2dda1fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GNUmakefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ PROG_PREFIX ?=
4242

4343
# This won't support any directory with spaces in its name, but you can just
4444
# make a symlink without spaces that points to the directory.
45+
# CARGO_BUILD_TARGET should be undefined for not cross-build.
4546
BASEDIR ?= $(shell pwd)
4647
ifdef CARGO_TARGET_DIR
4748
BUILDDIR := $(CARGO_TARGET_DIR)/${PROFILE}
4849
else
49-
BUILDDIR := $(BASEDIR)/target/${PROFILE}
50+
BUILDDIR := $(BASEDIR)/target/$(CARGO_BUILD_TARGET)/${PROFILE}
5051
endif
5152
PKG_BUILDDIR := $(BUILDDIR)/deps
5253
DOCSDIR := $(BASEDIR)/docs
@@ -400,7 +401,7 @@ distclean: clean
400401
ifeq ($(MANPAGES),y)
401402
# Do not cross-build uudoc
402403
build-uudoc:
403-
@unset CARGO_BUILD_TARGET && ${CARGO} build ${CARGOFLAGS} --bin uudoc --features "uudoc ${EXES}" ${PROFILE_CMD} --no-default-features
404+
${CARGO} build ${CARGOFLAGS} --bin uudoc --features "uudoc ${EXES}" ${PROFILE_CMD} --no-default-features
404405

405406
install-manpages: build-uudoc
406407
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1

0 commit comments

Comments
 (0)