rename libutil.a to libnotmuch_util.a

Apparently some systems (MacOS?) have a system library called libutil
and the name conflict causes problems. Since this library is quite
notmuch specific, rename it to something less generic.
This commit is contained in:
David Bremner 2017-03-14 08:10:07 -03:00
parent a8a2705222
commit c39f6361d0
5 changed files with 12 additions and 12 deletions

View file

@ -52,7 +52,7 @@ PV_FILE=bindings/python/notmuch/version.py
STD_CFLAGS := -std=gnu99 STD_CFLAGS := -std=gnu99
FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS) FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(STD_CFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS) FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lnotmuch_util -Llib -lnotmuch
ifeq ($(LIBDIR_IN_LDCONFIG),0) ifeq ($(LIBDIR_IN_LDCONFIG),0)
FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS) FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
endif endif

View file

@ -241,7 +241,7 @@ notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
notmuch.o: version.stamp notmuch.o: version.stamp
notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libnotmuch_util.a parse-time-string/libparse-time-string.a
$(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@ $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME) notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)

View file

@ -60,8 +60,8 @@ libnotmuch_modules := $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
$(dir)/libnotmuch.a: $(libnotmuch_modules) $(dir)/libnotmuch.a: $(libnotmuch_modules)
$(call quiet,AR) rcs $@ $^ $(call quiet,AR) rcs $@ $^
$(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym util/libutil.a parse-time-string/libparse-time-string.a $(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym util/libnotmuch_util.a parse-time-string/libparse-time-string.a
$(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libutil.a parse-time-string/libparse-time-string.a $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@ util/libnotmuch_util.a parse-time-string/libparse-time-string.a
notmuch.sym: $(srcdir)/$(dir)/notmuch.h $(libnotmuch_modules) notmuch.sym: $(srcdir)/$(dir)/notmuch.h $(libnotmuch_modules)
sh $(srcdir)/$(lib)/gen-version-script.sh $< $(libnotmuch_modules) > $@ sh $(srcdir)/$(lib)/gen-version-script.sh $< $(libnotmuch_modules) > $@

View file

@ -12,15 +12,15 @@ smtp_dummy_srcs = \
smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o) smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
$(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libnotmuch_util.a
$(call quiet,CC) $^ -o $@ $(LDFLAGS) $(call quiet,CC) $^ -o $@ $(LDFLAGS)
$(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a $(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libnotmuch_util.a
$(call quiet,CC) $^ -o $@ $(LDFLAGS) $(TALLOC_LDFLAGS) $(call quiet,CC) $^ -o $@ $(LDFLAGS) $(TALLOC_LDFLAGS)
random_corpus_deps = $(dir)/random-corpus.o $(dir)/database-test.o \ random_corpus_deps = $(dir)/random-corpus.o $(dir)/database-test.o \
notmuch-config.o status.o command-line-arguments.o \ notmuch-config.o status.o command-line-arguments.o \
lib/libnotmuch.a util/libutil.a \ lib/libnotmuch.a util/libnotmuch_util.a \
parse-time-string/libparse-time-string.a parse-time-string/libparse-time-string.a
$(dir)/random-corpus: $(random_corpus_deps) $(dir)/random-corpus: $(random_corpus_deps)

View file

@ -3,14 +3,14 @@
dir := util dir := util
extra_cflags += -I$(srcdir)/$(dir) extra_cflags += -I$(srcdir)/$(dir)
libutil_c_srcs := $(dir)/xutil.c $(dir)/error_util.c $(dir)/hex-escape.c \ libnotmuch_util_c_srcs := $(dir)/xutil.c $(dir)/error_util.c $(dir)/hex-escape.c \
$(dir)/string-util.c $(dir)/talloc-extra.c $(dir)/zlib-extra.c \ $(dir)/string-util.c $(dir)/talloc-extra.c $(dir)/zlib-extra.c \
$(dir)/util.c $(dir)/util.c
libutil_modules := $(libutil_c_srcs:.c=.o) libnotmuch_util_modules := $(libnotmuch_util_c_srcs:.c=.o)
$(dir)/libutil.a: $(libutil_modules) $(dir)/libnotmuch_util.a: $(libnotmuch_util_modules)
$(call quiet,AR) rcs $@ $^ $(call quiet,AR) rcs $@ $^
SRCS := $(SRCS) $(libutil_c_srcs) SRCS := $(SRCS) $(libnotmuch_util_c_srcs)
CLEAN := $(CLEAN) $(libutil_modules) $(dir)/libutil.a CLEAN := $(CLEAN) $(libnotmuch_util_modules) $(dir)/libnotmuch_util.a