buildsys: refactor and clean makefile
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Jun 2018 08:54:05 +0000 (10:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 19 Jun 2018 08:58:51 +0000 (10:58 +0200)
Makefile

index 82e80fa..6506e28 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,21 +20,17 @@ submodule:
 
 .PHONY: deb
 ${DEBS} deb: | submodule
-       rm -f *.deb
        rm -rf $(BUILDDIR)
-       mkdir $(BUILDDIR)
-       cp -a $(SRCDIR)/* $(BUILDDIR)/
-       cp -R debian $(BUILDDIR)/
+       cp -a $(SRCDIR) $(BUILDDIR)
+       cp -a debian $(BUILDDIR)/debian
        cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
 
 .PHONY: upload
 upload: ${DEBS}
        tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
 
-.PHONY: distclean
+.PHONY: clean distclean
 distclean: clean
-
-.PHONY: clean
 clean:
        rm -rf ${BUILDDIR} *.deb *.changes *.dsc *.buildinfo