From e460df14383d1fa551815dfeda21a286a14f2477 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Wed, 30 Aug 2017 01:52:22 -0700 Subject: [PATCH] Makefile: Use stamps for better build redundancy --- .gitignore | 1 + Makefile | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5789b95..8b26762 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ *.tar.gz xbps-cache xbps-cachedir* +stamps* !dracut/*/*.sh diff --git a/Makefile b/Makefile index bda2b0a..efeacc2 100644 --- a/Makefile +++ b/Makefile @@ -51,16 +51,18 @@ rootfs-all-print: void-%-ROOTFS-$(DATE).tar.xz: $(SCRIPTS) $(SUDO) ./mkrootfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) $* + mkdir -p stamps + touch stamps/platformfs-$*-$(DATE)-stamp platformfs-all: rootfs-all $(ALL_PLATFORMFS) platformfs-all-print: @echo $(ALL_PLATFORMFS) | sed "s: :\n:g" -void-%-PLATFORMFS-$(DATE).tar.xz: $(SCRIPTS) platformfs-%-helper +void-%-PLATFORMFS-$(DATE).tar.xz: $(SCRIPTS) stamps/platformfs-%-$(DATE)-stamp $(SUDO) ./mkplatformfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) $* void-$(shell ./lib.sh platform2arch $*)-ROOTFS-$(DATE).tar.xz -platformfs-%-helper: +stamps/platformfs-%-$(DATE)-stamp: # This rule exists because you can't do the shell expansion in the # dependent rule resolution stage $(MAKE) void-$(shell ./lib.sh platform2arch $*)-ROOTFS-$(DATE).tar.xz @@ -90,4 +92,4 @@ pxe-all-print: void-%-NETBOOT-$(DATE).tar.gz: $(SCRIPTS) void-%-ROOTFS-$(DATE).tar.xz $(SUDO) ./mknet.sh void-$*-ROOTFS-$(DATE).tar.xz -.PHONY: clean dist rootfs-all-print platformfs-all-print pxe-all-print platformfs-%-helper +.PHONY: clean dist rootfs-all-print platformfs-all-print pxe-all-print