build.mk: Do nothing with IMAGEDIR if $(DIRECT_TARGETS) is running

This commit is contained in:
Anton Midyukov 2021-10-14 13:50:24 +07:00
parent 8fdafec8b7
commit 7b4f9e4dbe

View File

@ -47,6 +47,7 @@ endif
# to be passed into distcfg.mk; suggestions are welcome
ifneq (,$(filter-out $(DIRECT_TARGETS),$(MAKECMDGOALS)))
IMAGEDIR ?= $(shell \
if [ -d "$$HOME/out" -a -w "$$HOME/out" ]; then \
echo "$$HOME/out"; \
@ -55,6 +56,7 @@ IMAGEDIR ?= $(shell \
mkdir -p "$$dir" && echo "$$dir" || echo "/tmp"; \
fi; \
)
endif
LOGDIR ?= $(wildcard $(IMAGEDIR))