[source] build: do not create empty directories in bin/
LEDE Commits
lede-commits at lists.infradead.org
Mon Jan 23 02:02:06 PST 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/afd2827c5c51361175d2e2ac9888d5ed59db5175
commit afd2827c5c51361175d2e2ac9888d5ed59db5175
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jan 23 10:49:57 2017 +0100
build: do not create empty directories in bin/
Some packages may not install any files
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
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 ee35ca1..3d0baad 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)
More information about the lede-commits
mailing list