From 47a031584155553e44688bcba15923e65ebc97b4 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Mon, 3 Apr 2023 16:15:22 +0100 Subject: [PATCH] Update Makefile.common - create a specific rule for the archive file --- Makefile.common | 10 ++++++---- make-archive.sh | 0 2 files changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 make-archive.sh diff --git a/Makefile.common b/Makefile.common index a2ab332..f81fbbe 100644 --- a/Makefile.common +++ b/Makefile.common @@ -92,6 +92,7 @@ EXT := $(shell cat $(NAME).spec | grep Source | head -n 1 | sed 's/Source: //' | ARCHIVEFILE := $(shell cat $(NAME).spec | grep Source | head -n 1 | sed -r 's/^Source[0..9]*:\s*//' | xargs basename) ARCHIVEFILE := $(shell rpm --queryformat '$(ARCHIVEFILE)\n' --specfile $(NAME).spec | head -n 1) TEMPDIR := $(shell mktemp -d) +ARCHIVEFILE := $(shell cat archivefilename) # default target: just make sure we've got the sources @@ -159,7 +160,7 @@ PREP_ARCHES = $(addprefix prep-,$(ARCHES)) # The TARGETS define is meant for local module targets that should be # made in addition to the SOURCEFILES whenever needed -TARGETS ?= archivefile +TARGETS ?= $(ARCHIVEFILE) #TARGETS ?= # default target - retrieve the sources and make the module specific targets @@ -334,18 +335,19 @@ check: test-srpm ## use this to build an srpm locally ifneq (, $(filter contribs7 contribs8 contribs9, $(BRANCH))) -srpm: sources $(TARGETS) +srpm: $(TARGETS) $(RPM_WITH_DIRS) $(DIST_DEFINES) --define _source_filedigest_algorithm=md5 --nodeps -bs $(SPECFILE) else srpm: sources $(TARGETS) $(RPM_WITH_DIRS) $(DIST_DEFINES) --nodeps -bs $(SPECFILE) endif +$(ARCHIVEFILE): + $(shell $(COMMON_DIR)/make-archive.sh) + test-srpm: srpm # Create the tar file used to transport the source tree -archivefile:: - $(shell common/make-archive.sh) verrel: @echo $(NAME)-$(VERSION)-$(RELEASE) diff --git a/make-archive.sh b/make-archive.sh old mode 100644 new mode 100755