about summary refs log tree commit diff
path: root/mk/libraries.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-25T10·17+0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-25T10·17+0000
commit79b7c596a994dd426807281c3c34d8cb6bc12e5f (patch)
tree63f4161876166cd3f53e0ca0cda2e97b78561cb8 /mk/libraries.mk
parented0a8dd71ad58d16c24d714ab2b9419285d1ffc0 (diff)
Use create-dir for installing dynamic libraries
Diffstat (limited to 'mk/libraries.mk')
-rw-r--r--mk/libraries.mk5
1 files changed, 3 insertions, 2 deletions
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)))