From aa3f402314995a19de8975397b94447f3d0b08e5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 23 May 2021 20:41:30 +0000 Subject: [PATCH] Makefile: Conditionally regenerate the source code archives Only regenerate the source code archives if one of the included source files has been modified. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9428 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 36545d500..153149811 100644 --- a/Makefile +++ b/Makefile @@ -301,7 +301,9 @@ make-scst-dist = \ tar -c$(1) -f "$${name}-$(3).tar.$(2)" "$${name}-$(3)" && \ rm -rf "$${name}-$(3)" -scst-dist-gzip: +scst-dist-gzip: scst-$(VERSION).tar.bz2 + +scst-$(VERSION).tar.bz2: $(shell scripts/list-source-files) $(call make-scst-dist,j,bz2,$(VERSION),grep -E '^doc/|^fcst/|^iscsi-scst/|^Makefile|^qla2x00t(|_git)/|^scripts/|^scst.spec|^scst/|^scst_local/|^srpt/|^usr/|^scstadmin/') scst-rpm: @@ -354,11 +356,13 @@ debian/compat: dpkg-query -W --showformat='$${Version}\n' debhelper 2>/dev/null | \ sed 's/\..*//' >$@ -../scst_$(VERSION).orig.tar.gz: debian/changelog debian/compat Makefile +../scst_$(VERSION).orig.tar.gz: debian/changelog debian/compat Makefile \ + $(shell scripts/list-source-files) $(call make-scst-dist,z,gz,$(VERSION),cat) && \ mv "scst-$(VERSION).tar.gz" "$@" -../scst_$(VERSION).orig.tar.xz: debian/changelog debian/compat Makefile +../scst_$(VERSION).orig.tar.xz: debian/changelog debian/compat Makefile \ + $(shell scripts/list-source-files) $(call make-scst-dist,J,xz,$(VERSION),cat) && \ mv "scst-$(VERSION).tar.xz" "$@"