From 447fd16ae074bcc48659caab040d2e21789680e2 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 26 May 2007 13:43:37 +0200 Subject: [PATCH] Fix 'make test' dependency when building test utility programs Problems was caused by undefined symbols: src/util/conv.c:308: undefined reference to `is_cp_utf8' src/util/conv.c:320: undefined reference to `cp2u' --- Makefile.config.in | 4 ++++ src/mime/backend/Makefile | 4 ++++ src/protocol/ftp/Makefile | 7 ++++++- src/util/Makefile | 4 ---- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index 6147b73b..7348ce59 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -183,6 +183,10 @@ MAKE_COLOR = @MAKE_COLOR@ LIB_O_NAME = lib.o +# Reverse a CONFIG_* string +# Usage $(call not,$(CONFIG_FOO)) +not = $(if $(findstring yes,$(1)),no,yes) + ### This is here because Makefile.config is usually the first thing ### we get and sometimes the all rule can be implicit, yet we want ### it always as the default one. So this should make sure it always diff --git a/src/mime/backend/Makefile b/src/mime/backend/Makefile index 909bf1dd..10582421 100644 --- a/src/mime/backend/Makefile +++ b/src/mime/backend/Makefile @@ -16,6 +16,7 @@ mailcap-cache.o: mailcap.c TESTDEPS = \ common.o \ + $(top_builddir)/src/intl/charsets.o \ $(top_builddir)/src/osdep/osdep.o \ $(top_builddir)/src/osdep/stub.o \ $(top_builddir)/src/util/conv.o \ @@ -28,5 +29,8 @@ TESTDEPS = \ TESTDEPS-$(CONFIG_NLS) += $(top_builddir)/src/intl/gettext/lib.o TESTDEPS-$(CONFIG_DEBUG) += $(top_builddir)/src/util/memdebug.o +TESTDEPS-$(call not,$(CONFIG_SMALL)) += \ + $(top_builddir)/src/util/fastfind.o \ + include $(top_srcdir)/Makefile.lib diff --git a/src/protocol/ftp/Makefile b/src/protocol/ftp/Makefile index 115744b7..cd805b62 100644 --- a/src/protocol/ftp/Makefile +++ b/src/protocol/ftp/Makefile @@ -3,9 +3,11 @@ include $(top_builddir)/Makefile.config OBJS = ftp.o parse.o -TEST_PROGS = ftp-parser +TEST_PROGS = \ + ftp-parser TESTDEPS = \ + $(top_builddir)/src/intl/charsets.o \ $(top_builddir)/src/osdep/stub.o \ $(top_builddir)/src/protocol/date.o \ $(top_builddir)/src/protocol/ftp/parse.o \ @@ -16,4 +18,7 @@ TESTDEPS = \ $(top_builddir)/src/util/string.o \ $(top_builddir)/src/util/time.o +TESTDEPS-$(call not,$(CONFIG_SMALL)) += \ + $(top_builddir)/src/util/fastfind.o \ + include $(top_srcdir)/Makefile.lib diff --git a/src/util/Makefile b/src/util/Makefile index 9c3f47a8..17b03227 100644 --- a/src/util/Makefile +++ b/src/util/Makefile @@ -3,10 +3,6 @@ include $(top_builddir)/Makefile.config INCLUDES += $(GNUTLS_CFLAGS) $(OPENSSL_CFLAGS) -# Reverse a CONFIG_* string -# Usage $(call not,$(CONFIG_FOO)) -not = $(if $(findstring yes,$(1)),no,yes) - OBJS-$(call not,$(CONFIG_SMALL)) += fastfind.o OBJS-$(CONFIG_CSS) += scanner.o OBJS-$(CONFIG_DEBUG) += memdebug.o