diff options
author | Thomas Haller <thaller@redhat.com> | 2017-02-27 12:02:43 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-27 13:36:03 +0100 |
commit | 3cb28534d34392ceec4adead0cfa97039796ccb7 (patch) | |
tree | 0d2c4f28194a32de0680fd86f12661d19797d5bd | |
parent | cf2ccbd5cc334890f1c62a66a0d996efb55c38e7 (diff) | |
download | libnl-3cb28534d34392ceec4adead0cfa97039796ccb7.tar.gz |
build: enable building cli during tests
The cli programs don't have any additional external dependencies.
So, during a `make check`, we should always build them, even if
they were disabled during configure and won't be installed.
-rw-r--r-- | Makefile.am | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am index 7cdd7d4b..81da1fc6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,6 +3,8 @@ ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = +noinst_LTLIBRARIES = +check_LTLIBRARIES = check_PROGRAMS = check_programs = @@ -487,8 +489,6 @@ EXTRA_lib_libnl_xfrm_3_la_DEPENDENCIES = \ lib_libnl_xfrm_3_la_LIBADD = \ lib/libnl-3.la -if ENABLE_CLI - lib_cli_ltlibraries_cls = \ lib/cli/cls/basic.la \ lib/cli/cls/cgroup.la @@ -502,11 +502,15 @@ lib_cli_ltlibraries_qdisc = \ lib/cli/qdisc/pfifo.la \ lib/cli/qdisc/plug.la +if ENABLE_CLI pkglib_clsdir = $(pkglibdir)/cli/cls pkglib_qdiscdir = $(pkglibdir)/cli/qdisc pkglib_cls_LTLIBRARIES = $(lib_cli_ltlibraries_cls) pkglib_qdisc_LTLIBRARIES = $(lib_cli_ltlibraries_qdisc) - +else +noinst_LTLIBRARIES += \ + $(lib_cli_ltlibraries_cls) \ + $(lib_cli_ltlibraries_qdisc) endif lib_cli_ldflags = \ @@ -535,8 +539,13 @@ lib_cli_qdisc_plug_la_LDFLAGS = $(lib_cli_ldflags) ############################################################################### +src_lib_ldflags = + if ENABLE_CLI lib_LTLIBRARIES += src/lib/libnl-cli-3.la +src_lib_ldflags += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) +else +check_LTLIBRARIES += src/lib/libnl-cli-3.la endif src_lib_libnl_cli_3_la_SOURCES = \ @@ -563,7 +572,7 @@ src_lib_libnl_cli_3_la_CPPFLAGS = \ -I$(srcdir)/include \ -I$(builddir)/include src_lib_libnl_cli_3_la_LDFLAGS = \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ + $(src_lib_ldflags) \ -Wl,--version-script=$(srcdir)/libnl-cli-3.sym src_lib_libnl_cli_3_la_LIBADD = \ lib/libnl-3.la \ @@ -648,6 +657,8 @@ else noinst_PROGRAMS += $(cli_programs) endif endif +else +check_PROGRAMS += $(cli_programs) endif src_genl_ctrl_list_CPPFLAGS = $(src_cppflags) @@ -825,12 +836,10 @@ tests_test_complex_HTB_with_hash_filters_LDADD = $(tests_ldadd) tests_test_u32_filter_with_actions_CPPFLAGS = $(tests_cppflags) tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd) -if ENABLE_CLI check_PROGRAMS += \ tests/test-cache-mngr \ tests/test-genl \ tests/test-nf-cache-mngr -endif tests_cli_ldadd = \ $(tests_ldadd) \ |