Makefile, profile.mk: not create temp directories with DIRECT_TARGETS

See-also: https://bugzilla.altlinux.org/show_bug.cgi?id=40148
This commit is contained in:
Anton Midyukov 2021-06-17 04:48:23 +07:00
parent 4f1110f796
commit 86f75210e0
2 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,7 @@ export PATH := $(CURDIR)/bin:$(PATH)
# recursive make considered useful for m-p
MAKE += -r --no-print-directory
DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check
export DIRECT_TARGETS := help help/distro help/ve help/vm clean distclean check
.PHONY: $(DIRECT_TARGETS)
# these build nothing so no use of reports either

View File

@ -2,6 +2,7 @@ ifndef MKIMAGE_PROFILES
$(error this makefile is designed to be included in toplevel one)
endif
ifneq (,$(filter-out $(DIRECT_TARGETS),$(MAKECMDGOALS)))
# this could have come from env; or could be symlinked; or is made anew
# (the reuse rationale is avoiding extra tmpdir lookups)
# NB: immediate assignment matters
@ -20,6 +21,7 @@ endif
ifeq (,$(BUILDDIR))
$(error suitable BUILDDIR unavailable)
endif
endif
# even smart caching only hurts when every build goes from scratch
NO_CACHE ?= 1