Adding -I@abs_top_srcdir@/Open-ILS/include will pull in the source tree
header files, so that the C unit tests can run before Evergreen has been
installed (and thus will be a valid test of the source header files
instead of relying on the installed versions that might be different).
Build c-apps before recursing into c-apps/tests:
This ensures that the required libraries are built before the C unit
tests are built, thus preventing "make check" on a just-configured
source tree from failing due to missing dependencies.
Also, link to the source tree directories first rather than last, to
ensure that we pull in the correct source (if possible). And remove the
cargo-cultish $(TMP) linking/including.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
# Process this file with automake to generate Makefile.in
#-----------------------------------------------------------
-SUBDIRS = tests
+SUBDIRS = . tests
AM_CFLAGS = $(DEF_CFLAGS) -DOSRF_LOG_PARAMS -I@top_srcdir@/include/
AM_LDFLAGS = $(DEF_LDFLAGS) -L$(DBI_LIBS) -lopensrf
-export DEF_LDFLAGS = -L. -L$(TMP) -L$(OPENSRF_LIBS)
-export DEF_CFLAGS = -D_LARGEFILE64_SOURCE -pipe -g -Wall -O2 -fPIC -I@top_srcdir@/include -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -I$(LIBXML2_HEADERS)/libxml -I$(TMP) -I$(OPENSRF_HEADERS)
+export DEF_LDFLAGS = -L@abs_top_srcdir@/Open-ILS/src/c-apps -L$(OPENSRF_LIBS)
+export DEF_CFLAGS = -D_LARGEFILE64_SOURCE -pipe -g -Wall -O2 -fPIC -I@abs_top_srcdir@/Open-ILS/include -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -I$(LIBXML2_HEADERS)/libxml -I$(OPENSRF_HEADERS)
export DEF_LDLIBS = -lopensrf
COMMON = testsuite.c
AM_CFLAGS = $(DEF_CFLAGS) -DOSRF_LOG_PARAMS
-AM_LDFLAGS = $(DEF_LDLIBS) -L$(DBI_LIBS)
+AM_LDFLAGS = $(DEF_LDFLAGS) $(DEF_LDLIBS) -L$(DBI_LIBS)
TESTS = check_util check_idl
check_PROGRAMS = check_util check_idl