[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 0d0b99f: AM_LDFLAGS and AM_CPPFLAGS in tests/M
[gnuastro-commits] master 0d0b99f: AM_LDFLAGS and AM_CPPFLAGS in tests/Makefile.am
Fri, 25 May 2018 07:26:33 -0400 (EDT)
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
AM_LDFLAGS and AM_CPPFLAGS in tests/Makefile.am
A few commits ago (67dca02: AM_CPPFLAGS and AM_LDFLAGS contain internal
libraries), we removed the internally build library from the global
CPPFLAGS and LDFLAGS variables in the top-level `configure.ac' (affecting
the whole build system). We manually included the library's path in each
program through the `AM_LDFLAGS' and `AM_CPPFLAGS'.
But adding Gnuastro's own library path to `tests/Makefile.am' directory was
forgotten. With this commit, the checks also have these variables to look
into the build's library, not the the host system's library.
This issue was reported by Leindert Boogaard.
tests/Makefile.am | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1d08315..2678a7a 100644
@@ -186,13 +186,6 @@ endif
-# `config.h' is built by `../lib/Makefile.am' and is only meant for outside
-# users (internally `config.h' has everything). Thus, we need to add it to
-# the include directories of the test programs in this directory.
-AM_CPPFLAGS = -I../lib
# Environment variables for the test scripts.
@@ -217,6 +210,15 @@ export hasghostscript=$(MAYBE_HASGHOSTSCRIPT);
# by `check_PROGRAMS' are compiled prior to actually running the targets of
# `TESTS'. So they do not need to be specified as any dependency, they will
# be present when the `.sh' based tests are run.
+# The `gnuastro/config.h' (needed by Gnuastro's library) is built by
+# `../lib/Makefile.am' and is only meant for outside users (to be tested
+# here). Thus (unlike the programs, which use `config.h') we need to add
+# the top build directory to the include search directories (`-I').
+AM_LDFLAGS = -L\$(top_builddir)/lib
+AM_CPPFLAGS = -I\$(top_srcdir)/lib -I\$(top_builddir)/lib
+# Rest of library check settings.
LDADD = -lgnuastro
check_PROGRAMS = multithread versioncxx
multithread_SOURCES = lib/multithread.c
@@ -226,6 +228,7 @@ lib/multithread.sh: mkprof/mosaic1.sh.log
# Final Tests
TESTS = prepconf.sh lib/multithread.sh lib/versioncxx.sh \
|[Prev in Thread]
||[Next in Thread]|
- [gnuastro-commits] master 0d0b99f: AM_LDFLAGS and AM_CPPFLAGS in tests/Makefile.am,
Mohammad Akhlaghi <=