buildsys: make build-dir generation atomic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-05-22 13:22:43 +02:00
parent f26cc0b2d4
commit 9a75d60723

View File

@ -10,10 +10,11 @@ BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
all:
$(BUILDDIR):
rm -rf $(BUILDDIR)
cp -a src $(BUILDDIR)
cp -a debian $(BUILDDIR)/
echo "git clone git://git.proxmox.com/git/pve-guest-common.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-guest-common.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
mv $@.tmp $@
.PHONY: deb
deb: $(DEB)