[Ada] Do not use exponentiation for common bases in floating-point Value
[official-gcc.git] / libcody / tests / Makesub.in
blob329e94609eee4debed9b8209373806bc1ef11598
1 # CODYlib               -*- mode:Makefile -*-
2 # Copyright (C) 2019-2020 Nathan Sidwell, nathan@acm.org
3 # License: Apache v2.0
5 ALOY := @ALOY@
6 TESTS := $(patsubst $(srcdir)/%.cc,%,\
7         $(wildcard $(srcdir)/tests/*/*.cc))
8 TESTDIRS = $(shell cd $(srcdir)/${<D} ; echo *(/))
9 testdir := $(and $(filter-out /%,$(srcdir)),../)$(srcdir)/tests
11 check:: tests/cody.defs $(TESTS)
12         +cd ${<D} && srcbuilddir=$(srcdir)/tests JOUST=${<F} \
13           $(ALOY) -t kratos -o cody -g $(testdir)/jouster $(TESTDIRS)
14 ifeq ($(firstword $(aloy)),:)
15         @echo WARNING: tests were not run as Joust test harness was not found
16 endif
18 tests/cody.defs: tests/Makesub
19         echo '# Automatically generated by Make' >$@
20         echo 'testdir=$(testdir)' >>$@
21         echo 'timelimit=60' >>$@
22         echo 'memlimit=1' >>$@
23         echo 'cpulimit=60' >>$@
24         echo 'filelimit=1' >>$@
25         echo 'SHELL=$(SHELL)' >>$@
27 $(TESTS): %: %.o libcody.a
28         $(CXX) $(LDFLAGS) $< -lcody $(LIBS) -o $@
30 clean::
31         rm -f $(TESTS)
32         rm -f $(TESTS:=.o) $(TESTS:=.d)
34 ifeq ($(filter clean%,$(MAKECMDGOALS)),)
35 -include $(TESTS:=.d)
36 endif