From: Peter Johnson Date: Wed, 19 Sep 2001 19:35:53 +0000 (-0000) Subject: Allow make check and tests module to be disabled, as it's not portable yet. X-Git-Tag: v0.1.0~318 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3bd6541c5f2a57cb57d4bac40a14316e7a14ba6f;p=yasm Allow make check and tests module to be disabled, as it's not portable yet. svn path=/trunk/yasm/; revision=200 --- diff --git a/check/Makefile.am b/check/Makefile.am index a8896465..4f258aeb 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -1,6 +1,12 @@ # $IdPath$ +if CHECK noinst_LIBRARIES=libcheck.a +TESTS = +else +noinst_LIBRARIES= +TESTS = nocheck_error +endif libcheck_a_SOURCES = \ check.c \ @@ -18,6 +24,10 @@ libcheck_a_SOURCES = \ list.c \ list.h +nocheck_error: + @echo "Run configure with --enable-check before running make check" + @exit 1 + if DEV CFLAGS = -ansi -pedantic -Wall -g endif diff --git a/configure.ac b/configure.ac index 7fd2a865..a0f61022 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,15 @@ AC_ARG_ENABLE(dev, esac],[dev=false]) AM_CONDITIONAL(DEV, test x$dev = xtrue) +AC_ARG_ENABLE(check, +[ --disable-check Disable building of test suite and make check], +[case "${enableval}" in + yes) check=true ;; + no) check=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-check) ;; +esac],[check=true]) +AM_CONDITIONAL(CHECK, test x$check = xtrue) + AM_PROG_CC_STDC ALL_LINGUAS="" diff --git a/configure.in b/configure.in index 7fd2a865..a0f61022 100644 --- a/configure.in +++ b/configure.in @@ -17,6 +17,15 @@ AC_ARG_ENABLE(dev, esac],[dev=false]) AM_CONDITIONAL(DEV, test x$dev = xtrue) +AC_ARG_ENABLE(check, +[ --disable-check Disable building of test suite and make check], +[case "${enableval}" in + yes) check=true ;; + no) check=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-check) ;; +esac],[check=true]) +AM_CONDITIONAL(CHECK, test x$check = xtrue) + AM_PROG_CC_STDC ALL_LINGUAS="" diff --git a/libyasm/tests/Makefile.am b/libyasm/tests/Makefile.am index bb97bc20..7dc55967 100644 --- a/libyasm/tests/Makefile.am +++ b/libyasm/tests/Makefile.am @@ -1,10 +1,15 @@ # $IdPath$ +if CHECK TESTS = \ bytecode_test noinst_PROGRAMS = \ bytecode_test +else +TESTS = +noinst_PROGRAMS = +endif bytecode_test_SOURCES = \ bytecode_test.c diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index bb97bc20..7dc55967 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -1,10 +1,15 @@ # $IdPath$ +if CHECK TESTS = \ bytecode_test noinst_PROGRAMS = \ bytecode_test +else +TESTS = +noinst_PROGRAMS = +endif bytecode_test_SOURCES = \ bytecode_test.c diff --git a/tests/Makefile.am b/tests/Makefile.am index ab95ecbf..5a72427b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,8 +1,13 @@ # $IdPath$ +if CHECK #TESTS = \ #noinst_PROGRAMS = \ +else +#TESTS = +#noinst_PROGRAMS = +endif INCLUDES= -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/check LDADD = \