]> git.proxmox.com Git - libxdgmime-perl.git/commitdiff
buildsys: make build-dir generation atomic
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Jun 2023 14:12:13 +0000 (16:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Jun 2023 14:12:13 +0000 (16:12 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index b1e97e74ead3ecbbe66546caa09faf31c974040b..74e1edc07e72e9f3ddcb2f1f597f4af0418f1483 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,11 +20,12 @@ update-bindings:
 
 .PHONY: $(BUILDSRC)
 $(BUILDSRC):
-       -rm -rf $(BUILDSRC)
-       cp -a $(OPKGNAME) $(BUILDSRC)
-       cp -a $(UPSTREAM)/xdgmime*.[ch] $(BUILDSRC)/
-       perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("$(BUILDSRC)/ppport.h");'
-       cp -a debian $(BUILDSRC)
+       -rm -rf $@ $@.tmp
+       cp -a $(OPKGNAME) $@.tmp
+       cp -a $(UPSTREAM)/xdgmime*.[ch] $@.tmp/
+       perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("$@.tmp/ppport.h");'
+       cp -a debian $@.tmp
+       mv $@.tmp $@
 
 .PHONY: dsc
 dsc: