about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mk/install.mk4
-rw-r--r--mk/libraries.mk5
2 files changed, 5 insertions, 4 deletions
diff --git a/mk/install.mk b/mk/install.mk
index 32048a38b2fe..64fc6a696a2e 100644
--- a/mk/install.mk
+++ b/mk/install.mk
@@ -4,7 +4,7 @@ define create-dir =
   ifndef $(1)_SEEN
     $(1)_SEEN = 1
     $(1):
-	install -d $(1)
+	$(QUIET) install -d $(1)
   endif
 endef
 
@@ -18,6 +18,6 @@ define install-file-in =
   $$(eval $$(call create-dir,$(1)))
 
   $(1)/$(notdir $(2)): $(2) | $(1)
-	install -t $(1) $(2)
+	$(QUIET) install -t $(1) $(2)
 
 endef
diff --git a/mk/libraries.mk b/mk/libraries.mk
index 8b1e848e094f..633bfdba812a 100644
--- a/mk/libraries.mk
+++ b/mk/libraries.mk
@@ -56,8 +56,9 @@ define build-library =
 
     _libs_final := $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_INSTALL_PATH))
 
-    $$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final)
-	install -d $$($(1)_INSTALL_DIR)
+    $$(eval $$(call create-dir,$$($(1)_INSTALL_DIR)))
+
+    $$($(1)_INSTALL_PATH): $$($(1)_OBJS) $$(_libs_final) | $$($(1)_INSTALL_DIR)
 	$(QUIET) $(CXX) -o $$@ -shared $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$($(1)_LDFLAGS_PROPAGATED) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE_INSTALLED))
 
     $(1)_LDFLAGS_USE_INSTALLED += -L$$($(1)_INSTALL_DIR) -Wl,-rpath,$$($(1)_INSTALL_DIR) -l$$(patsubst lib%,%,$$(strip $$($(1)_NAME)))