]> git.proxmox.com Git - libpve-u2f-server-perl.git/commitdiff
buildsys: make build-dir generation atomic
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 May 2023 13:44:39 +0000 (15:44 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 May 2023 13:44:39 +0000 (15:44 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index f76096df26ea57d1c6f35fc1e9ff64732a41478a..d9ca69cc71ff8e81aaff0b1f141e5443ffc6a279 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -50,10 +50,11 @@ install: PVE/U2F.pm U2F.so
 
 .PHONY: $(BUILDSRC)
 $(BUILDSRC):
-       rm -rf $(BUILDSRC)
-       mkdir $(BUILDSRC)
-       rsync -a debian Makefile PVE U2F.xs base64.h $(BUILDSRC)/
-       echo "git clone git://git.proxmox.com/git/libpve-u2f-server-perl.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE
+       rm -rf $@ $@.tmp
+       mkdir $@.tmp
+       cp -a debian Makefile PVE U2F.xs base64.h $@.tmp/
+       echo "git clone git://git.proxmox.com/git/libpve-u2f-server-perl.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
+       mv $@.tmp $@
 
 .PHONY: deb
 deb: $(DEB)