about summary refs log tree commit diff
path: root/mk/libraries.mk
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-12T10·39+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-12-12T10·39+0100
commit4da804651378b612313c8fb71688f71a4717a26e (patch)
treebb6724f2a9ed55f2ccb34c36b6032ddbe230bc5d /mk/libraries.mk
parent034bbcafafdbec0b2c4d29b1d5018bec20120e77 (diff)
Don't include all *.dep files
Diffstat (limited to 'mk/libraries.mk')
-rw-r--r--mk/libraries.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/mk/libraries.mk b/mk/libraries.mk
index 58c67063be5e..bea684490f7e 100644
--- a/mk/libraries.mk
+++ b/mk/libraries.mk
@@ -89,9 +89,11 @@ define build-library =
   # Propagate CXXFLAGS to the individual object files.
   $$(foreach obj, $$($(1)_OBJS), $$(eval $$(obj)_CXXFLAGS=$$($(1)_CXXFLAGS)))
 
-  include $$(wildcard $$(_d)/*.dep)
+  # Include .dep files, if they exist.
+  $(1)_DEPS := $$(addsuffix .dep, $$(basename $$(_srcs)))
+  -include $$($(1)_DEPS)
 
   libs_list += $$($(1)_PATH)
-  clean_files += $$(_d)/*.a $$(_d)/*.so $$(_d)/*.o $$(_d)/*.dep
+  clean_files += $$(_d)/*.a $$(_d)/*.so $$(_d)/*.o $$(_d)/*.dep $$($(1)_DEPS) $$($(1)_OBJS)
   dist_files += $$(_srcs)
 endef