From 1b91242ae9394351b03333739ebd67db990d606a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 24 May 2023 19:24:59 +0200 Subject: [PATCH] buildsys: make build-dir generation atomic Signed-off-by: Thomas Lamprecht --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0bf36cd..cce63bf 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,11 @@ SIMDSC=$(SIMPACKAGE)_$(DEB_VERSION).dsc all: deb $(BUILDDIR): - rm -rf $(BUILDDIR) - rsync -a src/ debian $(BUILDDIR) - echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE + rm -rf $@ $@.tmp + cp -a src/ $@.tmp + cp -a debian $@.tmp/ + echo "git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE + mv $@.tmp $@ .PHONY: dinstall dinstall: $(DEB) $(SIMDEB) -- 2.39.2