Properly filter sqlite objects when building with WITH_SQLITE=0

Fixes https://bugs.gentoo.org/show_bug.cgi?id=606870

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2017-01-24 21:47:26 +01:00
parent 25faec270e
commit 27a14806e7

View file

@ -12,19 +12,14 @@ OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
ZATHURA_OBJECTS = \
$(filter-out ../${BUILDDIR_RELEASE}/zathura/main.o, $(wildcard ../${BUILDDIR_RELEASE}/zathura/*.o))
ZATHURA_OBJECTS_DEBUG = \
$(filter-out ../${BUILDDIR_DEBUG}/zathura/main.o, $(wildcard ../${BUILDDIR_DEBUG}/zathura/*.o))
ZATHURA_OBJECTS_GCOV= \
$(filter-out ../${BUILDDIR_GCOV}/zathura/main.o, $(wildcard ../${BUILDDIR_GCOV}/zathura/*.o))
FILTER = %/main.o
ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC)
LIBS += $(SQLITE_LIB)
CPPFLAGS += -DWITH_SQLITE
else
SOURCE = $(filter-out database-sqlite.c,$(OSOURCE))
FILTER += %/database-sqlite.o
endif
ifneq ($(WITH_MAGIC),0)
@ -39,6 +34,13 @@ LIBS += $(SYNCTEX_LIB)
CPPFLAGS += -DWITH_SYNCTEX
endif
ZATHURA_OBJECTS = \
$(filter-out $(FILTER), $(wildcard ../${BUILDDIR_RELEASE}/zathura/*.o))
ZATHURA_OBJECTS_DEBUG = \
$(filter-out $(FILTER), $(wildcard ../${BUILDDIR_DEBUG}/zathura/*.o))
ZATHURA_OBJECTS_GCOV= \
$(filter-out $(FILTER), $(wildcard ../${BUILDDIR_GCOV}/zathura/*.o))
ifneq ($(wildcard ${VALGRIND_SUPPRESSION_FILE}),)
VALGRIND_ARGUMENTS += --suppressions=${VALGRIND_SUPPRESSION_FILE}
endif