summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-01-30 07:57:48 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-01-30 08:44:34 +0100
commit4ec893a748a0fd7981403d0fcc803dbfd3e35fe1 (patch)
treed943dfa96188eaf3aa84e0b23de9188da5022a6f /Makefile
parent7b14c02d0d4b32e1976bbc51b9ec73112d8ce17e (diff)
downloadpodman-4ec893a748a0fd7981403d0fcc803dbfd3e35fe1.tar.gz
podman-4ec893a748a0fd7981403d0fcc803dbfd3e35fe1.tar.bz2
podman-4ec893a748a0fd7981403d0fcc803dbfd3e35fe1.zip
speed up Makefile
Speed up the Makefile by removing variable references from the release targets. Now, the variables will only be (lazily) evaluated when they are actually needed and not for each invocation of the Makefile which has it down considerably. Fixes: #4829 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 666f4a1ed..f90124435 100644
--- a/Makefile
+++ b/Makefile
@@ -394,7 +394,7 @@ release.txt:
echo -n " $$field"; done >> "$@"
echo "" >> "$@"
-podman-v$(RELEASE_NUMBER).tar.gz: binaries docs release.txt
+podman-release.tar.gz: binaries docs release.txt
$(eval TMPDIR := $(shell mktemp -d -p '' podman_XXXX))
$(eval SUBDIR := podman-v$(RELEASE_NUMBER))
mkdir -p "$(TMPDIR)/$(SUBDIR)"
@@ -404,8 +404,8 @@ podman-v$(RELEASE_NUMBER).tar.gz: binaries docs release.txt
tar -czvf $@ --xattrs -C "$(TMPDIR)" "./release.txt" "./$(SUBDIR)"
-rm -rf "$(TMPDIR)"
-# Must call make in-line: Dependency-spec. w/ wild-card also consumes variable value.
-podman-remote-v$(RELEASE_NUMBER)-%.zip:
+# Must call make in-line: Dependency-spec. w/ wild-card.
+podman-remote-release-%.zip:
$(MAKE) podman-remote-$* install-podman-remote-$*-docs release.txt \
RELEASE_BASENAME=$(shell hack/get_release_info.sh REMOTENAME) \
RELEASE_DIST=$* RELEASE_DIST_VER="-"
@@ -424,12 +424,12 @@ podman-remote-v$(RELEASE_NUMBER)-%.zip:
.PHONY: podman-release
podman-release:
rm -f release.txt
- $(MAKE) podman-v$(RELEASE_NUMBER).tar.gz
+ $(MAKE) podman-release.tar.gz
.PHONY: podman-remote-%-release
podman-remote-%-release:
rm -f release.txt
- $(MAKE) podman-remote-v$(RELEASE_NUMBER)-$*.zip
+ $(MAKE) podman-remote-release-$*.zip
.PHONY: docker-docs
docker-docs: docs