source: tests/Makefile.am @ 1e995d6

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since 1e995d6 was 1e995d6, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

fix cfa-suffix problem in build

  • Property mode set to 100644
File size: 5.7 KB
Line 
1######################## -*- Mode: Makefile-Automake -*- ######################
2##
3## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
4##
5## The contents of this file are covered under the licence agreement in the
6## file "LICENCE" distributed with Cforall.
7##
8## Makefile.am --
9##
10## Author           : Peter A. Buhr
11## Created On       : Sun May 31 09:08:15 2015
12## Last Modified By : Peter A. Buhr
13## Last Modified On : Fri Nov 16 15:29:54 2018
14## Update Count     : 65
15###############################################################################
16
17AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
18
19include $(top_srcdir)/src/cfa.make
20
21debug=yes
22installed=no
23
24quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
25
26concurrent=
27timeouts=
28
29TEST_PY = python ${builddir}/test.py
30
31# applies to both programs
32AM_CFLAGS = $(if $(test), 2> $(test), ) \
33        -g \
34        -Wall \
35        -Wno-unused-function \
36        -quiet @CFA_FLAGS@ \
37        -DIN_DIR="${srcdir}/.in/"
38
39AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS}
40CC = @CFACC@
41
42PRETTY_PATH=cd ${srcdir} &&
43
44.PHONY: list .validate
45.INTERMEDIATE: .validate .validate.cfa
46EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
47
48fstream_test_SOURCES = fstream_test.cfa
49
50avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
51
52#----------------------------------------------------------------------------------------------------------------
53all-local :
54        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
55
56all-tests :
57        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
58
59clean-local :
60        rm -f ${EXTRA_PROGRAMS}
61
62list :
63        @+${TEST_PY} --list ${concurrent}
64
65.validate: .validate.cfa
66        $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror
67
68.validate.cfa:
69        @echo "int main() { return 0; }" > ${@}
70
71dummy_hack.c:
72        @echo "int main() { return 0; }" > ${@}
73
74concurrency :
75        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
76
77#----------------------------------------------------------------------------------------------------------------
78
79# implicit rule so not all test require a rule
80% : %.c $(CFACC)
81        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
82
83% : %.cfa $(CFACC)
84        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
85
86declarationSpecifier: declarationSpecifier.cfa $(CFACC)
87        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
88
89gccExtensions : gccExtensions.cfa $(CFACC)
90        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
91
92extension : extension.cfa $(CFACC)
93        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
94
95attributes : attributes.cfa $(CFACC)
96        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
97
98functions: functions.cfa $(CFACC)
99        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
100
101KRfunctions : KRfunctions.cfa $(CFACC)
102        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
103
104sched-ext-parse : sched-ext-parse.c $(CFACC)
105        $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
106
107gmp : gmp.cfa $(CFACC)
108        $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
109
110#builtins
111builtins/sync: builtins/sync.c $(CFACC)
112        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
113
114#------------------------------------------------------------------------------
115
116#To make errors path independent we need to cd into the correct directories
117completeTypeError : completeTypeError.cfa $(CFACC)
118        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
119
120typedefRedef-ERR1: typedefRedef.cfa $(CFACC)
121        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
122
123alloc-ERROR: alloc.cfa $(CFACC)
124        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
125
126fallthrough-ERROR: fallthrough.cfa $(CFACC)
127        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
128
129nested-types-ERR1: nested-types.cfa $(CFACC)
130        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
131
132nested-types-ERR2: nested-types.cfa $(CFACC)
133        $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
134
135# Constructor/destructor tests
136raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CFACC)
137        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
138
139raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CFACC)
140        $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
141
142raii/memberCtors-ERR1: raii/memberCtors.c $(CFACC)
143        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
144
145raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CFACC)
146        $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
147
148# Warnings
149warnings/self-assignment: warnings/self-assignment.c $(CFACC)
150        $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
Note: See TracBrowser for help on using the repository browser.