add DIST_DIR target

This commit is contained in:
Lance Vick 2023-02-27 14:26:04 -08:00
parent 8b98574565
commit 6883a7dced
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 3 additions and 12 deletions

View File

@ -49,7 +49,6 @@ executables = $(docker) git patch
toolchain: \ toolchain: \
$(CACHE_DIR) \ $(CACHE_DIR) \
$(FETCH_DIR) \ $(FETCH_DIR) \
$(DIST_DIR) \
$(BIN_DIR) \ $(BIN_DIR) \
$(OUT_DIR) \ $(OUT_DIR) \
$(CACHE_DIR_ROOT)/toolchain.tar \ $(CACHE_DIR_ROOT)/toolchain.tar \
@ -88,8 +87,10 @@ attest: toolchain-clean
$(MAKE) TARGET=$(TARGET) VERSION=$(VERSION) $(MAKE) TARGET=$(TARGET) VERSION=$(VERSION)
diff -q $(OUT_DIR)/manifest.txt $(DIST_DIR)/manifest.txt; diff -q $(OUT_DIR)/manifest.txt $(DIST_DIR)/manifest.txt;
$(DIST_DIR): $(DIST_DIR): default
mkdir -p $@ mkdir -p $@
rm -rf $@/*
cp -R $(OUT_DIR)/* $@/
$(BIN_DIR): $(BIN_DIR):
mkdir -p $@ mkdir -p $@
@ -131,16 +132,6 @@ $(CACHE_DIR_ROOT)/toolchain.state: \
docker load -i $(CACHE_DIR_ROOT)/toolchain.tar docker load -i $(CACHE_DIR_ROOT)/toolchain.tar
docker images --no-trunc --quiet $(IMAGE) > $@ docker images --no-trunc --quiet $(IMAGE) > $@
$(DIST_DIR)/release.env: \
$(DIST_DIR) \
$(OUT_DIR)/release.env
cp $(OUT_DIR)/release.env $(DIST_DIR)/release.env
$(DIST_DIR)/manifest.txt: \
$(DIST_DIR) \
$(OUT_DIR)/manifest.txt
cp $(OUT_DIR)/manifest.txt $(DIST_DIR)/manifest.txt
$(OUT_DIR)/release.env: | $(OUT_DIR) $(OUT_DIR)/release.env: | $(OUT_DIR)
echo 'VERSION=$(VERSION)' > $(OUT_DIR)/release.env echo 'VERSION=$(VERSION)' > $(OUT_DIR)/release.env
echo 'GIT_REF=$(GIT_REF)' >> $(OUT_DIR)/release.env echo 'GIT_REF=$(GIT_REF)' >> $(OUT_DIR)/release.env