]> git.proxmox.com Git - proxmox-offline-mirror.git/commitdiff
buildsys: avoid that build directory is created by phony target
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Oct 2022 06:33:28 +0000 (08:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 17 Oct 2022 06:33:28 +0000 (08:33 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile

index d6f87e1f4579656d5278cf4c8b6a2f937801bd83..b92443c3ceb5c8020385b2f83e4237f91482c09c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,8 @@ $(SUBDIRS):
        $(MAKE) -C $@
 
 .PHONY: build
-build:
+build: $(BUILDDIR)
+$(BUILDDIR):
        rm -rf $(BUILDDIR) $(BUILDDIR_TMP); mkdir $(BUILDDIR_TMP)
        rm -f debian/control
        debcargo package \
@@ -52,13 +53,13 @@ build:
 
 .PHONY: deb
 deb: $(DEB)
-$(DEB): build
+$(DEB): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -b -us -uc --no-pre-clean
        lintian $(DEB) $(DOC_DEB) $(HELPER_DEB)
 
 .PHONY: dsc
 dsc: $(DSC)
-$(DSC): build
+$(DSC): $(BUILDDIR)
        cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc
        lintian $(DSC)