mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-12 04:24:51 +01:00
441a327051
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>
18 lines
599 B
Text
18 lines
599 B
Text
# -*- makefile-gmake -*-
|
|
|
|
dir := util
|
|
extra_cflags += -I$(srcdir)/$(dir)
|
|
|
|
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)/util.c $(dir)/gmime-extra.c $(dir)/crypto.c \
|
|
$(dir)/repair.c $(dir)/path-util.c \
|
|
$(dir)/unicode-util.c
|
|
|
|
libnotmuch_util_modules := $(libnotmuch_util_c_srcs:.c=.o)
|
|
|
|
$(dir)/libnotmuch_util.a: $(libnotmuch_util_modules)
|
|
$(call quiet,AR) rcs $@ $^
|
|
|
|
SRCS := $(SRCS) $(libnotmuch_util_c_srcs)
|
|
CLEAN := $(CLEAN) $(libnotmuch_util_modules) $(dir)/libnotmuch_util.a
|