From: Edward Hervey Date: Sun, 19 Nov 2017 17:18:19 +0000 (+0100) Subject: orc: Add a configure option to disable tests X-Git-Tag: orc-0.4.33~194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56ec92b41dc303870b873f5a90965780e661db19;p=platform%2Fupstream%2Forc.git orc: Add a configure option to disable tests For targets where it doesn't make sense. Note that this will disable the build of orc-bugreport since it depends on the the orc_test helper library --- diff --git a/Makefile.am b/Makefile.am index e0436af..bc0db2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,18 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = orc orc-test tools examples doc testsuite +if BUILD_TESTS +ORCTEST_DIR = orc-test +TESTSUITE_DIR= testsuite +else +ORCTEST_DIR = +TESTSUITE_DIR = +endif + +SUBDIRS = orc $(ORCTEST_DIR) tools $(TESTSUITE_DIR) examples doc + +DIST_SUBDIRS = orc orc-test tools examples testsuite doc + EXTRA_DIST = COPYING RELEASE autogen.sh gtk-doc.make orc.m4 \ $(shell find "$(top_srcdir)" -type f -name meson.build ! -path "$(top_srcdir)/orc-0.4.*" ) \ diff --git a/configure.ac b/configure.ac index 7dc9b30..f0ba61c 100644 --- a/configure.ac +++ b/configure.ac @@ -204,6 +204,19 @@ AM_CONDITIONAL(ENABLE_BACKEND_ARM, test "x$ENABLE_BACKEND_ARM" = "xyes") AM_CONDITIONAL(ENABLE_BACKEND_C64X, test "x$ENABLE_BACKEND_C64X" = "xyes") AM_CONDITIONAL(ENABLE_BACKEND_MIPS, test "x$ENABLE_BACKEND_MIPS" = "xyes") +dnl building of tests +AC_ARG_ENABLE(tests, + AS_HELP_STRING([--disable-tests],[disable building test apps]), + [ + case "${enableval}" in + yes) BUILD_TESTS=yes ;; + no) BUILD_TESTS=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;; + esac + ], +[BUILD_TESTS=yes]) dnl Default value +AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes") + dnl Check for -Bsymbolic-functions linker flag used to avoid dnl intra-library PLT jumps, if available. AC_ARG_ENABLE(Bsymbolic, diff --git a/tools/Makefile.am b/tools/Makefile.am index d45d0af..eaec4f4 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,12 @@ -bin_PROGRAMS = orcc orc-bugreport +SOURCES = orcc.c orc-bugreport.c + +bin_PROGRAMS = orcc + +if BUILD_TESTS +# orc-bugreport depends on liborc_test +bin_PROGRAMS += orc-bugreport +endif AM_CFLAGS = $(ORC_CFLAGS) LDADD = $(ORC_LIBS)