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