From 71f3e33623da960c06274104883f68d71aab298f Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Thu, 2 Mar 2023 09:27:27 -0800 Subject: [PATCH] smarter dist/manifest management --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a840eab..39811f3 100644 --- a/Makefile +++ b/Makefile @@ -86,9 +86,10 @@ attest: toolchain-clean $(MAKE) TARGET=$(TARGET) VERSION=$(VERSION) diff -q $(OUT_DIR)/manifest.txt $(DIST_DIR)/manifest.txt; -$(DIST_DIR): default - mkdir -p $@ +.PHONY: $(DIST_DIR) +$(DIST_DIR): rm -rf $@/* + $(MAKE) toolchain-clean default cp -R $(OUT_DIR)/* $@/ $(BIN_DIR): @@ -138,7 +139,7 @@ $(OUT_DIR)/release.env: | $(OUT_DIR) echo 'GIT_KEY=$(GIT_KEY)' >> $(OUT_DIR)/release.env echo 'GIT_TIMESTAMP=$(GIT_TIMESTAMP)' >> $(OUT_DIR)/release.env -$(OUT_DIR)/manifest.txt: | $(OUT_DIR) +$(OUT_DIR)/manifest.txt: $(wildcard $(OUT_DIR)/*) find -L $(OUT_DIR) \ -type f \ -not -path "$(OUT_DIR)/manifest.txt" \