[PATCH] libnotmuch: only build symbols list after the modules are built
Thomas Jost
schnouki at schnouki.net
Wed Jul 20 05:38:18 PDT 2011
If the notmuch.sym target does not explicitly depend on $(libnotmuch_modules),
gen-version-script.sh may be run before all the .o files are created. This can
be observed when doing a parallel build on a machine with many cores:
$ make -j
...
sh lib/gen-version-script.sh lib/notmuch.h lib/filenames.o lib/string-list.o
lib/libsha1.o lib/message-file.o lib/messages.o lib/sha1.o lib/tags.o
lib/xutil.o lib/database.o lib/directory.o lib/index.o lib/message.o
lib/query.o lib/thread.o > notmuch.sym
nm: 'lib/libsha1.o': No such file
nm: 'lib/message-file.o': No such file
nm: 'lib/database.o': No such file
nm: 'lib/directory.o': No such file
nm: 'lib/index.o': No such file
nm: 'lib/message.o': No such file
nm: 'lib/query.o': No such file
nm: 'lib/thread.o': No such file
...
---
lib/Makefile.local | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 9210f0e..fbc2f6a 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -74,7 +74,7 @@ $(dir)/libnotmuch.a: $(libnotmuch_modules)
$(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym
$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@
-notmuch.sym: lib/notmuch.h
+notmuch.sym: lib/notmuch.h $(libnotmuch_modules)
sh lib/gen-version-script.sh $< $(libnotmuch_modules) > $@
$(dir)/$(SONAME): $(dir)/$(LIBNAME)
--
1.7.6
More information about the notmuch
mailing list