aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-23 10:49:57 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-23 11:01:56 +0100
commitafd2827c5c51361175d2e2ac9888d5ed59db5175 (patch)
tree8103e6e83f549aae0c896d0105c917a4e742263a
parent0e22d6377569cea4ba00b81d6ec64a1582a2cea4 (diff)
downloadupstream-afd2827c5c51361175d2e2ac9888d5ed59db5175.tar.gz
upstream-afd2827c5c51361175d2e2ac9888d5ed59db5175.tar.bz2
upstream-afd2827c5c51361175d2e2ac9888d5ed59db5175.zip
build: do not create empty directories in bin/
Some packages may not install any files Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--include/package-bin.mk5
1 files 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)