OSDN Git Service

test/math: don't try to build test dep as test
[uclinux-h8/uClibc.git] / test / math / Makefile.in
index e801112..914fc75 100644 (file)
@@ -1,12 +1,19 @@
 # uClibc math tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
-TESTS := basic-test rint signgam tst-definitions test-fpucw test-float test-ifloat test-double test-idouble
-ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),y)
-TESTS += test-ldouble test-ildoubl compile_test
+# libm-test.c is a generated file used by the tests internally so skip it
+TESTS_DISABLED := libm-test
+
+# gamma (removed from TESTS, need to add "small errors are ok" machinery there)
+TESTS_DISABLED += gamma
+ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
+TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test
 else
 CFLAGS_basic-test := -DNO_LONG_DOUBLE
 endif
+ifeq ($(DO_C99_MATH),)
+TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb
+endif
 
 DODIFF_rint     := 1
 DODIFF_signgam  := 1
@@ -21,9 +28,17 @@ EXTRA_LDFLAGS   := -lm
 
 PERL := /usr/bin/perl
 
-$(TESTS): libm-test.c
+MDEPS := $(wildcard test-*.c)
+$(MDEPS): libm-test.c
+
+TARGET_ULP := $(TARGET_ARCH)
+ULP_SUFFIX :=
+ifeq ($(TARGET_ARCH),mips)
+ULP_SUFFIX:=$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
+endif
+TARGET_ULP:=$(TARGET_ULP)$(ULP_SUFFIX)
 
-libm-test.c: libm-test.inc gen-libm-test.pl
-       $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ARCH) ./libm-test.inc -o "." 2>&1 > /dev/null
+libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl
+       $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null
 
 EXTRA_CLEAN := libm-test.c libm-test-ulps.h