notmuch/compat/Makefile.local
Đoàn Trần Công Danh 441a327051 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:07:00 -03:00

24 lines
451 B
Text

# -*- makefile-gmake -*-
dir := compat
extra_cflags += -I$(srcdir)/$(dir)
notmuch_compat_srcs :=
ifneq ($(HAVE_GETLINE),1)
notmuch_compat_srcs += $(dir)/getline.c $(dir)/getdelim.c
endif
ifneq ($(HAVE_STRCASESTR),1)
notmuch_compat_srcs += $(dir)/strcasestr.c
endif
ifneq ($(HAVE_STRSEP),1)
notmuch_compat_srcs += $(dir)/strsep.c
endif
ifneq ($(HAVE_TIMEGM),1)
notmuch_compat_srcs += $(dir)/timegm.c
endif
SRCS := $(SRCS) $(notmuch_compat_srcs)