]> git.proxmox.com Git - pve-qemu.git/blobdiff - Makefile
buildsys: derive upload dist automatically
[pve-qemu.git] / Makefile
index 497c6f3bf92d431f963d122abfd254611dfa0b0e..3cd6aafc555f0c0cf601daf9391b2e5d7c45ee49 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-include /usr/share/dpkg/pkg-info.mk
-include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/default.mk
 
 PACKAGE = pve-qemu-kvm
 
@@ -19,6 +18,9 @@ submodule:
        test -f "${SRCDIR}/configure" || git submodule update --init --recursive
 
 $(BUILDDIR): keycodemapdb | submodule
+       # check if qemu/ was used for a build
+       # if so, please run 'make distclean' in the submodule and try again
+       test ! -f $(SRCDIR)/build/config.status
        rm -rf $(BUILDDIR)
        cp -a $(SRCDIR) $(BUILDDIR)
        cp -a debian $(BUILDDIR)/debian
@@ -45,8 +47,9 @@ update:
        git add keycodemapdb
 
 .PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
 upload: $(DEBS)
-       tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist buster
+       tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
 
 .PHONY: distclean clean
 distclean: clean