]> git.proxmox.com Git - pve-container.git/commitdiff
buildsys: improve builddir generation
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 25 May 2023 07:49:15 +0000 (09:49 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 25 May 2023 07:59:42 +0000 (09:59 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Makefile

index 00eadff4badaa2303ba481bbeb93c0d6d7fac6e5..18319fff3ad0b2d9b7c69fd95c825ba4428ce951 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,11 @@ all: $(DEB)
 dinstall: $(DEB)
        dpkg -i $(DEB)
 
-$(BUILDDIR):
-       rm -rf $(BUILDDIR)
-       rsync -a src/ debian $(BUILDDIR)
-       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+$(BUILDDIR): src debian
+       rm -rf $(BUILDDIR) $(BUILDDIR).tmp; mkdir $(BUILDDIR).tmp
+       cp -t $(BUILDDIR).tmp -a debian src/*
+       echo "git clone git://git.proxmox.com/git/pve-container\\ngit checkout $(GITVERSION)" >$(BUILDDIR).tmp/debian/SOURCE
+       mv $(BUILDDIR).tmp $(BUILDDIR)
 
 .PHONY: deb
 deb: $(DEB)
@@ -39,7 +40,7 @@ sbuild: $(DSC)
 .PHONY: clean
 clean:
        $(MAKE) -C src clean
-       rm -rf $(BUILDDIR)
+       rm -rf $(BUILDDIR) $(BUILDDIR).tmp
        rm -f *.deb *.changes *.buildinfo *.dsc *.tar.?z
 
 .PHONY: distclean