2020-08-08 13:49:49 +02:00
|
|
|
# -*- makefile-gmake -*-
|
2011-10-23 12:05:13 -03:00
|
|
|
|
|
|
|
dir := util
|
|
|
|
extra_cflags += -I$(srcdir)/$(dir)
|
|
|
|
|
2017-03-14 08:10:07 -03:00
|
|
|
libnotmuch_util_c_srcs := $(dir)/xutil.c $(dir)/error_util.c $(dir)/hex-escape.c \
|
2014-03-29 14:53:17 -03:00
|
|
|
$(dir)/string-util.c $(dir)/talloc-extra.c $(dir)/zlib-extra.c \
|
2019-03-25 23:07:24 -03:00
|
|
|
$(dir)/util.c $(dir)/gmime-extra.c $(dir)/crypto.c \
|
compat: rename {,notmuch_}canonicalize_file_name
When compat canonicalize_file_name was introduced, it was limited to
C code only because it was used by C code only during that time.
>From 5ec6fd4d, (lib/open: check for split configuration when creating
database., 2021-02-16), lib/open.cc, which is C++, relies on the
existent of canonicalize_file_name.
However, we can't blindly enable canonicalize_file_name for C++ code,
because different implementation has different additional signature for
C++ and users can arbitrarily add -DHAVE_CANONICALIZE_FILE_NAME=0 to
{C,CXX}FLAGS.
Let's move our implementation into a util library.
Helped-by: Tomi Ollila <tomi.ollila@iki.fi>
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
2021-04-24 08:05:37 +07:00
|
|
|
$(dir)/repair.c $(dir)/path-util.c \
|
2019-03-25 23:07:24 -03:00
|
|
|
$(dir)/unicode-util.c
|
2011-10-23 12:05:13 -03:00
|
|
|
|
2017-03-14 08:10:07 -03:00
|
|
|
libnotmuch_util_modules := $(libnotmuch_util_c_srcs:.c=.o)
|
2011-10-23 12:05:13 -03:00
|
|
|
|
2017-03-14 08:10:07 -03:00
|
|
|
$(dir)/libnotmuch_util.a: $(libnotmuch_util_modules)
|
2011-10-23 12:05:13 -03:00
|
|
|
$(call quiet,AR) rcs $@ $^
|
2011-11-26 09:55:07 -08:00
|
|
|
|
2017-03-14 08:10:07 -03:00
|
|
|
SRCS := $(SRCS) $(libnotmuch_util_c_srcs)
|
|
|
|
CLEAN := $(CLEAN) $(libnotmuch_util_modules) $(dir)/libnotmuch_util.a
|