]> git.proxmox.com Git - libxdgmime-perl.git/blobdiff - Makefile
buildsys: make build-dir generation atomic
[libxdgmime-perl.git] / 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: