optional PRESERVE_CACHE argument

This commit is contained in:
Lance Vick 2023-04-27 13:54:27 -07:00
parent dafafd5d6c
commit 4eff8b258b
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@ UID := $(shell id -u)
GID := $(shell id -g)
USER := $(UID):$(GID)
CPUS := $(shell docker run -it debian nproc)
PRESERVE_CACHE := "false"
GIT_REF := $(shell git log -1 --format=%H)
GIT_AUTHOR := $(shell git log -1 --format=%an)
GIT_KEY := $(shell git log -1 --format=%GP)
@ -106,7 +107,8 @@ reproduce: toolchain-clean
.PHONY: $(DIST_DIR)
$(DIST_DIR):
rm -rf $@/*
$(MAKE) toolchain-clean default
[ "$(PRESERVE_CACHE)" = "true" ] || $(MAKE) toolchain-clean
$(MAKE) default
cp -R $(OUT_DIR)/* $@/
$(BIN_DIR):