From afd2827c5c51361175d2e2ac9888d5ed59db5175 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 23 Jan 2017 10:49:57 +0100 Subject: [PATCH] build: do not create empty directories in bin/ Some packages may not install any files Signed-off-by: Felix Fietkau --- include/package-bin.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/package-bin.mk b/include/package-bin.mk index ee35ca180f..3d0baad228 100644 --- a/include/package-bin.mk +++ b/include/package-bin.mk @@ -28,8 +28,9 @@ ifeq ($(DUMP),) install-bin-$(1): $(PKG_BUILD_DIR)/.pkgdir/$(1).installed rm -rf $(BIN_DIR)/$(1) - $(INSTALL_DIR) $(BIN_DIR)/$(1) - $(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(BIN_DIR)/$(1)/ + $(if $(wildcard $(PKG_BUILD_DIR)/.pkgdir/$(1)/*), \ + $(INSTALL_DIR) $(BIN_DIR)/$(1) && $(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(BIN_DIR)/$(1)/ \ + ) clean-$(1): rm -rf $(BIN_DIR)/$(1) -- 2.25.1