summaryrefslogtreecommitdiff
path: root/math/Makefile
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-19 06:29:27 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-19 06:29:27 +0000
commit8847214f239965f538e42a09d3d08ce8c700dea2 (patch)
treea30f842a83c823affb01fedbe803535f1c2ec2fa /math/Makefile
parent4dba81eafc9aead81c0644ea64f092bb2185e5b8 (diff)
Update.
1999-10-18 Andreas Jaeger <aj@suse.de> Added improved math testsuite: * math/libm-test.inc: New file, contains all tests from libm-test.c but in a different form. * math/libm-test.c: Removed. * sysdeps/generic/libm-test-ulps: New file: Fallback ulps file. * math/gen-libm-test.pl: New file: Preprocessor. * math/test-double.c: Adopted to new testsuite. * math/test-idouble.c: Likewise. * math/test-float.c: Likewise. * math/test-ifloat.c: Likewise. * math/test-ldouble.c: Likewise. * math/test-ildoubl.c: Likewise. * math/Makefile: Added rules to generate new suite.
Diffstat (limited to 'math/Makefile')
-rw-r--r--math/Makefile32
1 files changed, 28 insertions, 4 deletions
diff --git a/math/Makefile b/math/Makefile
index 670faaf854..8c326f2650 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -74,14 +74,38 @@ routines = $(calls) $(calls:=f) $(long-c-$(long-double-fcts))
long-c-yes = $(calls:=l)
distribute += $(long-c-yes:=.c)
+include ../Makeconfig
+
# Rules for the test suite.
-tests = test-float test-double $(test-longdouble-$(long-double-fcts)) \
- test-ifloat test-idouble test-matherr test-fenv \
- atest-exp atest-sincos atest-exp2 basic-test
+tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test
# We do the `long double' tests only if this data type is available and
# distinct from `double'.
test-longdouble-yes = test-ldouble test-ildoubl
+ifneq (no,$(PERL))
+libm-tests = test-float test-double $(test-longdouble-$(long-double-fcts)) \
+ test-ifloat test-idouble
+libm-tests.o = $(addsuffix .o,$(libm-tests))
+
+tests += $(libm-tests)
+libm-tests-generated = libm-test-ulps.h libm-test.c libm-test.stmp
+generated += $(libm-tests-generated)
+
+
+ulps-file= $(firstword $(wildcard $(config-sysdirs:%=$(..)%/libm-test-ulps)))
+
+$(objpfx)libm-test.stmp: $(ulps-file) libm-test.inc gen-libm-test.pl
+ $(PERL) gen-libm-test.pl -u $< -o $(objdir)/math/
+ @echo > $@
+
+$(objpfx)test-float.o: $(objpfx)libm-test.stmp
+$(objpfx)test-ifloat.o: $(objpfx)libm-test.stmp
+$(objpfx)test-double.o: $(objpfx)libm-test.stmp
+$(objpfx)test-idouble.o: $(objpfx)libm-test.stmp
+$(objpfx)test-ldouble.o: $(objpfx)libm-test.stmp
+$(objpfx)test-ildoubl.o: $(objpfx)libm-test.stmp
+endif
+
CFLAGS-test-float.c = -fno-inline -ffloat-store
CFLAGS-test-double.c = -fno-inline -ffloat-store
CFLAGS-test-ldouble.c = -fno-inline -ffloat-store
@@ -100,7 +124,7 @@ LDLIBS-atest-exp = math/libm
LDLIBS-atest-sincos = math/libm
LDLIBS-atest-exp2 = math/libm
-distribute += libm-test.c
+distribute += libm-test.inc gen-libm-test.pl
# The -lieee module sets the _LIB_VERSION_ switch to IEEE mode