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 : Thu Dec 19 22:11:14 2024
|
---|
14 | ## Update Count : 200
|
---|
15 | ###############################################################################
|
---|
16 |
|
---|
17 | AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names
|
---|
18 | ACLOCAL_AMFLAGS = -I automake
|
---|
19 |
|
---|
20 | include $(top_srcdir)/tools/build/cfa.make
|
---|
21 |
|
---|
22 | DEFAULT_INCLUDES = -I${abs_srcdir}
|
---|
23 |
|
---|
24 | debug ?= yes
|
---|
25 | installed ?= no
|
---|
26 | ARCH = ${if ${arch},"--arch=${arch}"}
|
---|
27 | arch_support = "x86/x64/arm"
|
---|
28 | TIMEOUT = ${if ${timeout},"--timeout=${timeout}"}
|
---|
29 | GLOBAL_TIMEOUT = ${if ${global-timeout},"--global-timeout=${global-timeout}"}
|
---|
30 | ARCHIVE_ERRORS = ${if ${archive-errors},"--archive-errors=${archive-errors}"}
|
---|
31 |
|
---|
32 | DEBUG_FLAGS = -debug -g -O0
|
---|
33 |
|
---|
34 | quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes meta/dumpable
|
---|
35 |
|
---|
36 | TEST_PY = python3 ${builddir}/test.py
|
---|
37 |
|
---|
38 | WFLAGS_STRICT = \
|
---|
39 | -Wall \
|
---|
40 | -Wextra \
|
---|
41 | -Werror
|
---|
42 |
|
---|
43 | WFLAGS_LAX = \
|
---|
44 | -Wall \
|
---|
45 | -Werror=return-type \
|
---|
46 | -Wno-unused-function \
|
---|
47 | -Wno-psabi
|
---|
48 |
|
---|
49 | # These tests opt for lax wflags. (By default, new tests get strict wflags.)
|
---|
50 | # Indented list entries are finer-grained targets under the test.
|
---|
51 | # Making this association implicit would be ideal, but requires learning more automake than is affordable.
|
---|
52 | WFLGAS_OPT_LAX = \
|
---|
53 | alloc \
|
---|
54 | alloc2 \
|
---|
55 | array \
|
---|
56 | array-collections/array-raii-c \
|
---|
57 | array-collections/array-raii-cfa \
|
---|
58 | array-collections/array-sbscr-types \
|
---|
59 | array-collections/boxed \
|
---|
60 | array-collections/boxed% \
|
---|
61 | array-collections/dimexpr-match-c \
|
---|
62 | array-collections/dimexpr-match-cfa \
|
---|
63 | array-ERR1 \
|
---|
64 | array-ERR2 \
|
---|
65 | array-ERR3 \
|
---|
66 | attributes \
|
---|
67 | attr-priority \
|
---|
68 | builtins/sync \
|
---|
69 | cast \
|
---|
70 | collections/atomic_mpsc \
|
---|
71 | collections/queue \
|
---|
72 | collections/sequence \
|
---|
73 | collections/stack \
|
---|
74 | collections/string-api-coverage \
|
---|
75 | collections/string-api-coverage-noshare \
|
---|
76 | collections/vector-demo \
|
---|
77 | concurrency/actors/dynamic \
|
---|
78 | concurrency/actors/executor \
|
---|
79 | concurrency/actors/inherit \
|
---|
80 | concurrency/actors/inline \
|
---|
81 | concurrency/actors/matrixMultiply \
|
---|
82 | concurrency/actors/pingpong \
|
---|
83 | concurrency/actors/poison \
|
---|
84 | concurrency/actors/static \
|
---|
85 | concurrency/actors/types \
|
---|
86 | concurrency/barrier/generation \
|
---|
87 | concurrency/barrier/last \
|
---|
88 | concurrency/barrier/order \
|
---|
89 | concurrency/channels/big_elems \
|
---|
90 | concurrency/channels/churn \
|
---|
91 | concurrency/channels/contend \
|
---|
92 | concurrency/channels/daisy_chain \
|
---|
93 | concurrency/channels/hot_potato \
|
---|
94 | concurrency/channels/ping_pong \
|
---|
95 | concurrency/channels/pub_sub \
|
---|
96 | concurrency/channels/zero_size \
|
---|
97 | concurrency/cluster \
|
---|
98 | concurrency/cofor \
|
---|
99 | concurrency/coroutineYield \
|
---|
100 | concurrency/examples/boundedBufferEXT \
|
---|
101 | concurrency/examples/boundedBufferINT \
|
---|
102 | concurrency/examples/datingService \
|
---|
103 | concurrency/examples/gortn \
|
---|
104 | concurrency/examples/matrixSum \
|
---|
105 | concurrency/examples/quickSort \
|
---|
106 | concurrency/futures/abandon \
|
---|
107 | concurrency/futures/basic \
|
---|
108 | concurrency/futures/multi \
|
---|
109 | concurrency/futures/select_future \
|
---|
110 | concurrency/futures/typed \
|
---|
111 | concurrency/futures/wait_any \
|
---|
112 | concurrency/join \
|
---|
113 | concurrency/lockfree_stack \
|
---|
114 | concurrency/migrate \
|
---|
115 | concurrency/monitor \
|
---|
116 | concurrency/multi-monitor \
|
---|
117 | concurrency/mutexstmt/locks \
|
---|
118 | concurrency/mutexstmt/monitors \
|
---|
119 | concurrency/mutexstmt/tuple \
|
---|
120 | concurrency/once \
|
---|
121 | concurrency/park/contention \
|
---|
122 | concurrency/park/force_preempt \
|
---|
123 | concurrency/park/start_parked \
|
---|
124 | concurrency/preempt \
|
---|
125 | concurrency/preempt2 \
|
---|
126 | concurrency/pthread/bounded_buffer \
|
---|
127 | concurrency/pthread/pthread_attr_test \
|
---|
128 | concurrency/pthread/pthread_cond_test \
|
---|
129 | concurrency/pthread/pthread_demo_create_join \
|
---|
130 | concurrency/pthread/pthread_demo_lock \
|
---|
131 | concurrency/pthread/pthread_key_test \
|
---|
132 | concurrency/pthread/pthread_once_test \
|
---|
133 | concurrency/readyQ/barrier_sleeper \
|
---|
134 | concurrency/readyQ/leader_spin \
|
---|
135 | concurrency/signal/block \
|
---|
136 | concurrency/signal/disjoint \
|
---|
137 | concurrency/signal/wait \
|
---|
138 | concurrency/sleep \
|
---|
139 | concurrency/suspend_then \
|
---|
140 | concurrency/thread \
|
---|
141 | concurrency/unified_locking/block_spin_lock \
|
---|
142 | concurrency/unified_locking/exp_backoff \
|
---|
143 | concurrency/unified_locking/fast_block_lock \
|
---|
144 | concurrency/unified_locking/futex_mutex \
|
---|
145 | concurrency/unified_locking/locks \
|
---|
146 | concurrency/unified_locking/mcs \
|
---|
147 | concurrency/unified_locking/mcs_block_spin_lock \
|
---|
148 | concurrency/unified_locking/mcs_spin \
|
---|
149 | concurrency/unified_locking/pthread_locks \
|
---|
150 | concurrency/unified_locking/simple_owner_lock \
|
---|
151 | concurrency/unified_locking/spin_queue_lock \
|
---|
152 | concurrency/unified_locking/timeout_lock \
|
---|
153 | concurrency/waitfor/barge \
|
---|
154 | concurrency/waitfor/dtor \
|
---|
155 | concurrency/waitfor/parse \
|
---|
156 | concurrency/waitfor/recurse \
|
---|
157 | concurrency/waitfor/statment \
|
---|
158 | concurrency/waitfor/when \
|
---|
159 | concurrency/waituntil/all_types \
|
---|
160 | concurrency/waituntil/basic_else \
|
---|
161 | concurrency/waituntil/channel_close \
|
---|
162 | concurrency/waituntil/channel_zero_size \
|
---|
163 | concurrency/waituntil/channels \
|
---|
164 | concurrency/waituntil/futures \
|
---|
165 | concurrency/waituntil/locks \
|
---|
166 | concurrency/waituntil/one_chan \
|
---|
167 | concurrency/waituntil/repeat_close \
|
---|
168 | concurrency/waituntil/timeout \
|
---|
169 | configs/parsebools \
|
---|
170 | configs/parsenums \
|
---|
171 | configs/usage \
|
---|
172 | coroutine/devicedriver \
|
---|
173 | coroutine/fibonacci \
|
---|
174 | coroutine/fmtLines \
|
---|
175 | coroutine/pingpong \
|
---|
176 | coroutine/prodcons \
|
---|
177 | coroutine/raii \
|
---|
178 | coroutine/runningTotal \
|
---|
179 | ctrl-flow/goto \
|
---|
180 | ctrl-flow/ifwhileCtl \
|
---|
181 | ctrl-flow/labelledExit \
|
---|
182 | ctrl-flow/loop_else \
|
---|
183 | designations \
|
---|
184 | enum \
|
---|
185 | enum_tests/inc-dec \
|
---|
186 | enum_tests/planet \
|
---|
187 | enum_tests/structEnum \
|
---|
188 | exceptions/cancel/coroutine \
|
---|
189 | exceptions/cancel/thread \
|
---|
190 | exceptions/cardgame \
|
---|
191 | exceptions/conditional \
|
---|
192 | exceptions/conditional-threads \
|
---|
193 | exceptions/cor_resumer \
|
---|
194 | exceptions/data-except \
|
---|
195 | exceptions/defaults \
|
---|
196 | exceptions/defaults-threads \
|
---|
197 | exceptions/fibonacci_nonlocal \
|
---|
198 | exceptions/finally \
|
---|
199 | exceptions/finally-threads \
|
---|
200 | exceptions/hotpotato \
|
---|
201 | exceptions/hotpotato_checked \
|
---|
202 | exceptions/interact \
|
---|
203 | exceptions/pingpong_nonlocal \
|
---|
204 | exceptions/polymorphic \
|
---|
205 | exceptions/resume \
|
---|
206 | exceptions/resume-threads \
|
---|
207 | exceptions/terminate \
|
---|
208 | exceptions/terminate-threads \
|
---|
209 | exceptions/trash \
|
---|
210 | exceptions/try-leave-catch \
|
---|
211 | exceptions/virtual-cast \
|
---|
212 | exceptions/virtual-poly \
|
---|
213 | expression \
|
---|
214 | forall \
|
---|
215 | function-operator \
|
---|
216 | gmp \
|
---|
217 | heap \
|
---|
218 | identFuncDeclarator \
|
---|
219 | identParamDeclarator \
|
---|
220 | include/includes \
|
---|
221 | include/stdincludes \
|
---|
222 | include/vector-collections \
|
---|
223 | include/vector-fstream \
|
---|
224 | include/vector-sequence \
|
---|
225 | init1 \
|
---|
226 | init1-ERROR \
|
---|
227 | io/away_fair \
|
---|
228 | io/comp_basic \
|
---|
229 | io/comp_fair \
|
---|
230 | io/io-acquire \
|
---|
231 | io/io-acquire2 \
|
---|
232 | io/io-acquire-in \
|
---|
233 | io/io-acquire-no-io \
|
---|
234 | io/io-acquire-out \
|
---|
235 | io/manipulatorsInput \
|
---|
236 | io/manipulatorsInput-uchunk \
|
---|
237 | io/many_read \
|
---|
238 | limits \
|
---|
239 | linking/io-acquire \
|
---|
240 | linking/mangling/anon \
|
---|
241 | linking/mangling/lib.o \
|
---|
242 | linking/mangling/main.o \
|
---|
243 | linking/withthreads \
|
---|
244 | linkonce \
|
---|
245 | link-once/% \
|
---|
246 | malloc \
|
---|
247 | math \
|
---|
248 | mathX \
|
---|
249 | maybe \
|
---|
250 | minmax \
|
---|
251 | nested_function \
|
---|
252 | nested-types \
|
---|
253 | nested-types-ERR1 \
|
---|
254 | nested-types-ERR2 \
|
---|
255 | numericConstants \
|
---|
256 | operators \
|
---|
257 | poly-d-cycle \
|
---|
258 | poly-many-arsz \
|
---|
259 | poly-member \
|
---|
260 | polymorphism \
|
---|
261 | poly-o-cycle \
|
---|
262 | PRNG \
|
---|
263 | quasiKeyword \
|
---|
264 | quotedKeyword \
|
---|
265 | raii/boxed-types \
|
---|
266 | raii/ctor-autogen \
|
---|
267 | raii/dtor-early-exit \
|
---|
268 | raii/init_once \
|
---|
269 | raii/partial \
|
---|
270 | rational \
|
---|
271 | references \
|
---|
272 | result \
|
---|
273 | shortCircuit \
|
---|
274 | sizeof \
|
---|
275 | smart-pointers \
|
---|
276 | sum \
|
---|
277 | switch \
|
---|
278 | tuple/tupleAssign \
|
---|
279 | tuple/tupleCast \
|
---|
280 | tuple/tupleMember \
|
---|
281 | tuple/tuplePolymorphism \
|
---|
282 | tuple/tupleVariadic \
|
---|
283 | typedefRedef \
|
---|
284 | typedefRedef-ERR1 \
|
---|
285 | typeof \
|
---|
286 | variableDeclarator \
|
---|
287 | vector \
|
---|
288 | warnings/self-assignment
|
---|
289 |
|
---|
290 | WFLAGS=${if ${filter ${WFLGAS_OPT_LAX},${@}},${WFLAGS_LAX},${WFLAGS_STRICT}}
|
---|
291 |
|
---|
292 | # applies to both programs
|
---|
293 | # since automake doesn't have support for CFA we have to
|
---|
294 | AM_CFLAGS = ${if ${test}, 2> ${test}, } \
|
---|
295 | -fdebug-prefix-map=${abspath ${abs_srcdir}}= \
|
---|
296 | -fdebug-prefix-map=/tmp= \
|
---|
297 | -fno-diagnostics-show-caret \
|
---|
298 | -g \
|
---|
299 | $(WFLAGS) \
|
---|
300 | -quiet @CFA_FLAGS@
|
---|
301 |
|
---|
302 | AM_CFAFLAGS = -XCFA --deterministic-out
|
---|
303 |
|
---|
304 | # get the desired cfa to test
|
---|
305 | TARGET_CFA = ${if ${filter ${installed},yes}, @CFACC_INSTALL@, @CFACC@}
|
---|
306 |
|
---|
307 | # adjust CC to current flags
|
---|
308 | CC = LC_ALL=C ${if ${DISTCC_CFA_PATH},distcc ${DISTCC_CFA_PATH} ${ARCH_FLAGS} ,${TARGET_CFA} ${DEBUG_FLAGS} ${ARCH_FLAGS}}
|
---|
309 | CFACC = ${CC}
|
---|
310 |
|
---|
311 | # get local binary for depedencies
|
---|
312 | CFACCBIN = @CFACC@
|
---|
313 |
|
---|
314 | # adjusted CC but without the actual distcc call
|
---|
315 | CFACCLOCAL = ${if ${DISTCC_CFA_PATH},${DISTCC_CFA_PATH} ${ARCH_FLAGS} ,${TARGET_CFA} ${DEBUG_FLAGS} ${ARCH_FLAGS}}
|
---|
316 | CFACCLINK = ${CFACCLOCAL} -quiet ${if ${test}, 2> ${test}, } ${${shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'}}
|
---|
317 |
|
---|
318 | PRETTY_PATH = mkdir -p ${dir ${abspath ${@}}} && cd ${srcdir} &&
|
---|
319 |
|
---|
320 | .PHONY : concurrency list .validate .test_makeflags
|
---|
321 | .INTERMEDIATE : .validate .validate.cfa .test_makeflags
|
---|
322 | EXTRA_PROGRAMS = array-collections/boxed avl_test linkonce linking/mangling/anon .dummy_hack # build but do not install
|
---|
323 | EXTRA_DIST = test.py \
|
---|
324 | pybin/__init__.py \
|
---|
325 | pybin/print-core.gdb \
|
---|
326 | pybin/settings.py \
|
---|
327 | pybin/test_run.py \
|
---|
328 | pybin/tools.py \
|
---|
329 | long_tests.hfa \
|
---|
330 | array-collections/boxed.hfa \
|
---|
331 | array-collections/boxed.cases.hfa \
|
---|
332 | avltree/avl-private.h \
|
---|
333 | avltree/avl.h \
|
---|
334 | exceptions/except-io.hfa \
|
---|
335 | exceptions/with-threads.hfa \
|
---|
336 | meta/fork+exec.hfa \
|
---|
337 | concurrency/clib_tls.c \
|
---|
338 | concurrency/clib.c \
|
---|
339 | concurrency/unified_locking/mutex_test.hfa \
|
---|
340 | concurrency/channels/parallel_harness.hfa \
|
---|
341 | array-collections/dimexpr-match.hfa \
|
---|
342 | array-collections/dimexpr-match-detail.sh \
|
---|
343 | array-collections/array-raii.hfa
|
---|
344 |
|
---|
345 | dist-hook:
|
---|
346 | echo "Gathering test files"
|
---|
347 | for file in `${TEST_PY} --list-dist`; do \
|
---|
348 | if ls ${srcdir}/$${file} > /dev/null 2>&1; then \
|
---|
349 | ${MKDIR_P} $$(dirname ${distdir}/$${file}); \
|
---|
350 | cp -df ${srcdir}/$${file} $$(dirname ${distdir}/$${file}); \
|
---|
351 | fi; \
|
---|
352 | done
|
---|
353 |
|
---|
354 | array_collections_boxed_SOURCES = array-collections/boxed.main.cfa array-collections/boxed.bookend.cfa
|
---|
355 | avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa
|
---|
356 | linkonce_SOURCES = link-once/main.cfa link-once/partner.cfa
|
---|
357 | linking_mangling_anon_SOURCES = linking/mangling/header.hfa linking/mangling/lib.cfa linking/mangling/main.cfa
|
---|
358 | # automake doesn't know we still need C/CPP rules so pretend like we have a C program
|
---|
359 | nodist__dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp
|
---|
360 |
|
---|
361 | #----------------------------------------------------------------------------------------------------------------
|
---|
362 |
|
---|
363 | # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
|
---|
364 | all-local : # This name is important to automake and implies the default build target.
|
---|
365 | @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${TIMEOUT} ${GLOBAL_TIMEOUT} ${ARCH} --all
|
---|
366 |
|
---|
367 | tests : all-local # synonym
|
---|
368 |
|
---|
369 | install : all-local # synonym, PAB only
|
---|
370 |
|
---|
371 | quick :
|
---|
372 | @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${ARCH} ${quick_test}
|
---|
373 |
|
---|
374 | concurrency :
|
---|
375 | @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${TIMEOUT} ${GLOBAL_TIMEOUT} ${ARCH} -Iconcurrency
|
---|
376 |
|
---|
377 | list :
|
---|
378 | @+${TEST_PY} --list
|
---|
379 |
|
---|
380 | help :
|
---|
381 | @echo "user targets:"
|
---|
382 | @echo " Run the complete test suite."
|
---|
383 | @echo " $$ make (null) / tests [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [timeout=seconds] [global-timeout=seconds] [arch=${arch_support}]"
|
---|
384 | @echo ""
|
---|
385 | @echo " Run the short (quick) test suite."
|
---|
386 | @echo " $$ make quick [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [arch=${arch_support}]"
|
---|
387 | @echo ""
|
---|
388 | @echo " Run the concurrency test suite."
|
---|
389 | @echo " $$ make concurrency [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [timeout=seconds] [global-timeout=seconds] [arch=${arch_support}]"
|
---|
390 | @echo ""
|
---|
391 | @echo " List all tests in the test suite."
|
---|
392 | @echo " $$ make list"
|
---|
393 |
|
---|
394 | mostlyclean-local :
|
---|
395 | find ${builddir} -not -path './__pycache__/*' -path '*.o' -delete
|
---|
396 | find ${builddir} -not -path './__pycache__/*' -path '*/.err/*.log' -delete
|
---|
397 | find ${builddir} -not -path './__pycache__/*' -path '*/.out/*.log' -delete
|
---|
398 | rm -f ${EXTRA_PROGRAMS}
|
---|
399 | rm -rf __pycache__
|
---|
400 |
|
---|
401 | distclean-local :
|
---|
402 | find ${builddir} -path '*.Po' -delete
|
---|
403 |
|
---|
404 | .test_makeflags:
|
---|
405 | @echo "${MAKEFLAGS}"
|
---|
406 |
|
---|
407 | .validate: .validate.cfa
|
---|
408 | ${CFACOMPILE} .validate.cfa -fsyntax-only -Wall -Wextra -Werror
|
---|
409 |
|
---|
410 | .validate.cfa:
|
---|
411 | @echo "int main() { return 0; }" > ${@}
|
---|
412 |
|
---|
413 | # automake doesn't know we still need C rules so pretend like we have a C program
|
---|
414 | .dummy_hack.c:
|
---|
415 | @echo "int main() { return 0; }" > ${@}
|
---|
416 |
|
---|
417 | .dummy_hackxx.cpp:
|
---|
418 | @echo "int bar() { return 0; }" > ${@}
|
---|
419 |
|
---|
420 | #----------------------------------------------------------------------------------------------------------------
|
---|
421 |
|
---|
422 | # Use for all tests, make sure the path are correct and all flags are added
|
---|
423 | CFACOMPILETEST=${PRETTY_PATH} ${CFACOMPILE} ${shell realpath --relative-to=${srcdir} ${<}} ${${shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g'}}
|
---|
424 |
|
---|
425 | #----------------------------------------------------------------------------------------------------------------
|
---|
426 |
|
---|
427 | # implicit rule so not all test require a rule
|
---|
428 | # split into two steps to support compiling remotely using distcc
|
---|
429 | # don't use distcc to do the linking because distcc doesn't do linking
|
---|
430 | % : %.cfa ${CFACCBIN}
|
---|
431 | ${CFACOMPILETEST} -c -o ${abspath ${@}}.o -DIN_DIR="${abspath ${dir ${<}}}/.in/"
|
---|
432 | ${CFACCLINK} ${@}.o -o ${abspath ${@}}
|
---|
433 | rm ${abspath ${@}}.o
|
---|
434 |
|
---|
435 | # implicit rule for c++ test
|
---|
436 | # convient for testing the testsuite itself but not actuall used
|
---|
437 | % : %.cpp
|
---|
438 | ${PRETTY_PATH} ${CXXCOMPILE} ${shell realpath --relative-to=${srcdir} ${<}} -o ${abspath ${@}}
|
---|
439 |
|
---|
440 | #------------------------------------------------------------------------------
|
---|
441 | # TARGETS WITH CUSTOM FLAGS
|
---|
442 | #------------------------------------------------------------------------------
|
---|
443 | # custom libs
|
---|
444 | gmp_FLAGSLD= -lgmp
|
---|
445 |
|
---|
446 | #------------------------------------------------------------------------------
|
---|
447 | # Generated code
|
---|
448 | GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions
|
---|
449 | ${GENERATED_CODE} : % : %.cfa ${CFACCBIN}
|
---|
450 | ${CFACOMPILETEST} -CFA -XCFA -p -c -fsyntax-only -o ${abspath ${@}}
|
---|
451 |
|
---|
452 | #------------------------------------------------------------------------------
|
---|
453 | # CUSTOM TARGET
|
---|
454 | #------------------------------------------------------------------------------
|
---|
455 | # tests that just validate syntax and compiler output should be compared to stderr
|
---|
456 | CFACOMPILE_SYNTAX = ${CFACOMPILETEST} -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o ${abspath ${@}}
|
---|
457 |
|
---|
458 | SYNTAX_ONLY_CODE = \
|
---|
459 | array cast expression identFuncDeclarator init1 limits nested-types numericConstants opt-params quasiKeyword switch typedefRedef variableDeclarator \
|
---|
460 | builtins/sync concurrency/waitfor/parse ctrl-flow/labelledExit include/stdincludes include/includes warnings/self-assignment
|
---|
461 |
|
---|
462 | ${SYNTAX_ONLY_CODE} : % : %.cfa ${CFACCBIN}
|
---|
463 | ${CFACOMPILE_SYNTAX}
|
---|
464 | ${if ${test}, cp ${test} ${abspath ${@}}, }
|
---|
465 |
|
---|
466 | # expected failures
|
---|
467 | # use custom target since they require a custom define *and* have a name that doesn't match the file
|
---|
468 |
|
---|
469 | array-ERR1 : array.cfa ${CFACCBIN}
|
---|
470 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
471 | -cp ${test} ${abspath ${@}}
|
---|
472 |
|
---|
473 | array-ERR2 : array.cfa ${CFACCBIN}
|
---|
474 | ${CFACOMPILE_SYNTAX} -DERR2
|
---|
475 | -cp ${test} ${abspath ${@}}
|
---|
476 |
|
---|
477 | array-ERR3 : array.cfa ${CFACCBIN}
|
---|
478 | ${CFACOMPILE_SYNTAX} -DERR3
|
---|
479 | -cp ${test} ${abspath ${@}}
|
---|
480 |
|
---|
481 | array-collections/dimexpr-match-c-ERRS : array-collections/dimexpr-match-c.cfa
|
---|
482 | ${CFACOMPILE_SYNTAX} -DERRS
|
---|
483 | -cp ${test} ${abspath ${@}}
|
---|
484 |
|
---|
485 | array-collections/dimexpr-match-cfa-ERRS : array-collections/dimexpr-match-cfa.cfa
|
---|
486 | ${CFACOMPILE_SYNTAX} -DERRS
|
---|
487 | -cp ${test} ${abspath ${@}}
|
---|
488 |
|
---|
489 | alloc-ERROR : alloc.cfa ${CFACCBIN}
|
---|
490 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
491 | -cp ${test} ${abspath ${@}}
|
---|
492 |
|
---|
493 | init1-ERROR : init1.cfa ${CFACCBIN}
|
---|
494 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
495 | -cp ${test} ${abspath ${@}}
|
---|
496 |
|
---|
497 | typedefRedef-ERR1 : typedefRedef.cfa ${CFACCBIN}
|
---|
498 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
499 | -cp ${test} ${abspath ${@}}
|
---|
500 |
|
---|
501 | nested-types-ERR1 : nested-types.cfa ${CFACCBIN}
|
---|
502 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
503 | -cp ${test} ${abspath ${@}}
|
---|
504 |
|
---|
505 | nested-types-ERR2 : nested-types.cfa ${CFACCBIN}
|
---|
506 | ${CFACOMPILE_SYNTAX} -DERR2
|
---|
507 | -cp ${test} ${abspath ${@}}
|
---|
508 |
|
---|
509 | raii/memberCtors-ERR1 : raii/memberCtors.cfa ${CFACCBIN}
|
---|
510 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
511 | -cp ${test} ${abspath ${@}}
|
---|
512 |
|
---|
513 | raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa ${CFACCBIN}
|
---|
514 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
515 | -cp ${test} ${abspath ${@}}
|
---|
516 |
|
---|
517 | raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa ${CFACCBIN}
|
---|
518 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
519 | -cp ${test} ${abspath ${@}}
|
---|
520 |
|
---|
521 | raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa ${CFACCBIN}
|
---|
522 | ${CFACOMPILE_SYNTAX} -DERR2
|
---|
523 | -cp ${test} ${abspath ${@}}
|
---|
524 |
|
---|
525 | raii/partial-ERR1 : raii/partial.cfa ${CFACCBIN}
|
---|
526 | ${CFACOMPILE_SYNTAX} -DERR1
|
---|
527 | -cp ${test} ${abspath ${@}}
|
---|
528 |
|
---|
529 | # Exception Tests
|
---|
530 | # Test with libcfathread; it changes how storage works.
|
---|
531 |
|
---|
532 | exceptions/%-threads : exceptions/%.cfa ${CFACCBIN}
|
---|
533 | ${CFACOMPILETEST} -include exceptions/with-threads.hfa -c -o ${abspath ${@}}.o
|
---|
534 | ${CFACCLOCAL} ${${shell echo "${@}_FLAGSLD" | sed 's/-\|\//_/g'}} ${abspath ${@}}.o -o ${abspath ${@}}
|
---|
535 |
|
---|
536 | # Linking tests
|
---|
537 | # Meta tests to make sure we see linking errors (can't compile with -O2 since it may multiply number of calls)
|
---|
538 | linking/linkerror : linking/linkerror.cfa ${CFACCBIN}
|
---|
539 | ${CFACOMPILETEST} -O0 -c -o ${abspath ${@}}.o
|
---|
540 | ${CFACCLINK} -O0 ${@}.o -o ${abspath ${@}}
|
---|
541 | rm ${abspath ${@}}.o
|
---|
542 |
|
---|
543 | #------------------------------------------------------------------------------
|
---|
544 | # Other targets
|
---|