From 9f6303535a7ccb30b9e73123e2072fdbd265483b Mon Sep 17 00:00:00 2001 From: "D. Mitch Bailey" Date: Wed, 12 Feb 2025 15:21:14 -0800 Subject: [PATCH] Added targets to unsplit files but leave the result compressed. --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 9df82c47..cc995518 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ ARCHIVE_EXT ?= gz # Needed to rebuild archives that were previously split SPLIT_FILES := $(shell find . -type f -name "*.$(ARCHIVE_EXT).00.split") +SPLIT_FILES_ARCHIVES := $(basename $(basename $(SPLIT_FILES))) SPLIT_FILES_SOURCES := $(basename $(basename $(basename $(SPLIT_FILES)))) # Needed to uncompress the existing archives @@ -275,6 +276,22 @@ uncompress-caravel: cd $(CARAVEL_ROOT) && \ $(MAKE) uncompress +.SECONDEXPANSION: +$(SPLIT_FILES_ARCHIVES): %: $$(sort $$(wildcard %.*.split)) + @cat $? > $@ + @rm $? + @echo "$? -> $@" + +.PHONY: unsplit +unsplit: $(SPLIT_FILES_ARCHIVES) + @echo "All split files have been combined!" + +# Needed for targets that are run from UPRJ_ROOT for which caravel isn't submoduled. +.PHONY: unsplit-caravel +unsplit-caravel: + cd $(CARAVEL_ROOT) && \ + $(MAKE) unsplit + # Digital Wrapper # verify that the wrapper was respected .PHONY: xor-wrapper