[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. |
---|
[e0330d2c] | 52 | WFLGAS_OPT_LAX = \ |
---|
[faf9e19] | 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 \ |
---|
[e0330d2c] | 288 | warnings/self-assignment |
---|
[faf9e19] | 289 | |
---|
| 290 | WFLAGS=${if ${filter ${WFLGAS_OPT_LAX},${@}},${WFLAGS_LAX},${WFLAGS_STRICT}} |
---|
| 291 | |
---|
[ef7d253] | 292 | # applies to both programs |
---|
[d65f92c] | 293 | # since automake doesn't have support for CFA we have to |
---|
[e2887a9] | 294 | AM_CFLAGS = ${if ${test}, 2> ${test}, } \ |
---|
| 295 | -fdebug-prefix-map=${abspath ${abs_srcdir}}= \ |
---|
[87fc1b4] | 296 | -fdebug-prefix-map=/tmp= \ |
---|
[0a19c51] | 297 | -fno-diagnostics-show-caret \ |
---|
[b8f6002] | 298 | -g \ |
---|
[faf9e19] | 299 | $(WFLAGS) \ |
---|
[b44959f] | 300 | -quiet @CFA_FLAGS@ |
---|
[7c03d6d] | 301 | |
---|
[7215000] | 302 | AM_CFAFLAGS = -XCFA --deterministic-out |
---|
| 303 | |
---|
[158b026] | 304 | # get the desired cfa to test |
---|
[e2887a9] | 305 | TARGET_CFA = ${if ${filter ${installed},yes}, @CFACC_INSTALL@, @CFACC@} |
---|
[158b026] | 306 | |
---|
[34e1494] | 307 | # adjust CC to current flags |
---|
[e2887a9] | 308 | CC = LC_ALL=C ${if ${DISTCC_CFA_PATH},distcc ${DISTCC_CFA_PATH} ${ARCH_FLAGS} ,${TARGET_CFA} ${DEBUG_FLAGS} ${ARCH_FLAGS}} |
---|
| 309 | CFACC = ${CC} |
---|
[ef7d253] | 310 | |
---|
[34e1494] | 311 | # get local binary for depedencies |
---|
| 312 | CFACCBIN = @CFACC@ |
---|
| 313 | |
---|
| 314 | # adjusted CC but without the actual distcc call |
---|
[e2887a9] | 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'}} |
---|
[34e1494] | 317 | |
---|
[e3d4fd1] | 318 | PRETTY_PATH = mkdir -p ${dir ${abspath ${@}}} && cd ${srcdir} && |
---|
[f7d3215] | 319 | |
---|
[bdbf536] | 320 | .PHONY : concurrency list .validate .test_makeflags |
---|
[e2887a9] | 321 | .INTERMEDIATE : .validate .validate.cfa .test_makeflags |
---|
[fd4df379] | 322 | EXTRA_PROGRAMS = array-collections/boxed avl_test linkonce linking/mangling/anon .dummy_hack # build but do not install |
---|
[a468e1e9] | 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 \ |
---|
[fd4df379] | 330 | array-collections/boxed.hfa \ |
---|
| 331 | array-collections/boxed.cases.hfa \ |
---|
[d0fa494] | 332 | avltree/avl-private.h \ |
---|
| 333 | avltree/avl.h \ |
---|
| 334 | exceptions/except-io.hfa \ |
---|
| 335 | exceptions/with-threads.hfa \ |
---|
| 336 | meta/fork+exec.hfa \ |
---|
[c26bea2a] | 337 | concurrency/clib_tls.c \ |
---|
| 338 | concurrency/clib.c \ |
---|
| 339 | concurrency/unified_locking/mutex_test.hfa \ |
---|
[9c4330d5] | 340 | concurrency/channels/parallel_harness.hfa \ |
---|
[0b8c951d] | 341 | array-collections/dimexpr-match.hfa \ |
---|
[ee16f8fc] | 342 | array-collections/dimexpr-match-detail.sh \ |
---|
| 343 | array-collections/array-raii.hfa |
---|
[a468e1e9] | 344 | |
---|
| 345 | dist-hook: |
---|
| 346 | echo "Gathering test files" |
---|
[e2887a9] | 347 | for file in `${TEST_PY} --list-dist`; do \ |
---|
[b24cbaf] | 348 | if ls ${srcdir}/$${file} > /dev/null 2>&1; then \ |
---|
[e2887a9] | 349 | ${MKDIR_P} $$(dirname ${distdir}/$${file}); \ |
---|
[b24cbaf] | 350 | cp -df ${srcdir}/$${file} $$(dirname ${distdir}/$${file}); \ |
---|
[a468e1e9] | 351 | fi; \ |
---|
| 352 | done |
---|
[44f44617] | 353 | |
---|
[fd4df379] | 354 | array_collections_boxed_SOURCES = array-collections/boxed.main.cfa array-collections/boxed.bookend.cfa |
---|
[107b01a] | 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 |
---|
[aff7e86] | 356 | linkonce_SOURCES = link-once/main.cfa link-once/partner.cfa |
---|
[258aaab8] | 357 | linking_mangling_anon_SOURCES = linking/mangling/header.hfa linking/mangling/lib.cfa linking/mangling/main.cfa |
---|
[2b10f95] | 358 | # automake doesn't know we still need C/CPP rules so pretend like we have a C program |
---|
[b7fe2e6] | 359 | nodist__dummy_hack_SOURCES = .dummy_hack.c .dummy_hackxx.cpp |
---|
[a0dcd2e] | 360 | |
---|
[73abe95] | 361 | #---------------------------------------------------------------------------------------------------------------- |
---|
[4daf79f] | 362 | |
---|
[5007618] | 363 | # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program |
---|
[c083c3d] | 364 | all-local : # This name is important to automake and implies the default build target. |
---|
[d144c26] | 365 | @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${TIMEOUT} ${GLOBAL_TIMEOUT} ${ARCH} --all |
---|
[4daf79f] | 366 | |
---|
[5007618] | 367 | tests : all-local # synonym |
---|
[4daf79f] | 368 | |
---|
[5007618] | 369 | install : all-local # synonym, PAB only |
---|
[df42128] | 370 | |
---|
[4daf79f] | 371 | quick : |
---|
[5007618] | 372 | @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${ARCH} ${quick_test} |
---|
[e2887a9] | 373 | |
---|
| 374 | concurrency : |
---|
[5007618] | 375 | @+${TEST_PY} --debug=${debug} --install=${installed} ${ARCHIVE_ERRORS} ${TIMEOUT} ${GLOBAL_TIMEOUT} ${ARCH} -Iconcurrency |
---|
[e2887a9] | 376 | |
---|
| 377 | list : |
---|
[bdbf536] | 378 | @+${TEST_PY} --list |
---|
[e2887a9] | 379 | |
---|
| 380 | help : |
---|
| 381 | @echo "user targets:" |
---|
| 382 | @echo " Run the complete test suite." |
---|
[5007618] | 383 | @echo " $$ make (null) / tests [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [timeout=seconds] [global-timeout=seconds] [arch=${arch_support}]" |
---|
[e2887a9] | 384 | @echo "" |
---|
| 385 | @echo " Run the short (quick) test suite." |
---|
[5007618] | 386 | @echo " $$ make quick [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [arch=${arch_support}]" |
---|
[e2887a9] | 387 | @echo "" |
---|
[bdbf536] | 388 | @echo " Run the concurrency test suite." |
---|
[5007618] | 389 | @echo " $$ make concurrency [debug=yes/no] [installed=yes/no] [archive-errors=dump-dir] [timeout=seconds] [global-timeout=seconds] [arch=${arch_support}]" |
---|
[e2887a9] | 390 | @echo "" |
---|
| 391 | @echo " List all tests in the test suite." |
---|
| 392 | @echo " $$ make list" |
---|
[927e9ce] | 393 | |
---|
[2a59655] | 394 | mostlyclean-local : |
---|
[e2887a9] | 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} |
---|
[2a59655] | 399 | rm -rf __pycache__ |
---|
| 400 | |
---|
| 401 | distclean-local : |
---|
[e2887a9] | 402 | find ${builddir} -path '*.Po' -delete |
---|
[927e9ce] | 403 | |
---|
[fc01219] | 404 | .test_makeflags: |
---|
[e2887a9] | 405 | @echo "${MAKEFLAGS}" |
---|
[fc01219] | 406 | |
---|
[1e995d6] | 407 | .validate: .validate.cfa |
---|
[e2887a9] | 408 | ${CFACOMPILE} .validate.cfa -fsyntax-only -Wall -Wextra -Werror |
---|
[1e995d6] | 409 | |
---|
| 410 | .validate.cfa: |
---|
[e2887a9] | 411 | @echo "int main() { return 0; }" > ${@} |
---|
[28582b2] | 412 | |
---|
[107b01a] | 413 | # automake doesn't know we still need C rules so pretend like we have a C program |
---|
| 414 | .dummy_hack.c: |
---|
[e2887a9] | 415 | @echo "int main() { return 0; }" > ${@} |
---|
[28582b2] | 416 | |
---|
[2b10f95] | 417 | .dummy_hackxx.cpp: |
---|
[e2887a9] | 418 | @echo "int bar() { return 0; }" > ${@} |
---|
[026a0f5] | 419 | |
---|
[73abe95] | 420 | #---------------------------------------------------------------------------------------------------------------- |
---|
[dc8511c] | 421 | |
---|
[e16797c] | 422 | # Use for all tests, make sure the path are correct and all flags are added |
---|
[e2887a9] | 423 | CFACOMPILETEST=${PRETTY_PATH} ${CFACOMPILE} ${shell realpath --relative-to=${srcdir} ${<}} ${${shell echo "${@}_FLAGSCFA" | sed 's/-\|\//_/g'}} |
---|
[d9b499c] | 424 | |
---|
[e16797c] | 425 | #---------------------------------------------------------------------------------------------------------------- |
---|
[a843067] | 426 | |
---|
[e16797c] | 427 | # implicit rule so not all test require a rule |
---|
[15f9c8e] | 428 | # split into two steps to support compiling remotely using distcc |
---|
[34e1494] | 429 | # don't use distcc to do the linking because distcc doesn't do linking |
---|
[e2887a9] | 430 | % : %.cfa ${CFACCBIN} |
---|
| 431 | ${CFACOMPILETEST} -c -o ${abspath ${@}}.o -DIN_DIR="${abspath ${dir ${<}}}/.in/" |
---|
| 432 | ${CFACCLINK} ${@}.o -o ${abspath ${@}} |
---|
| 433 | rm ${abspath ${@}}.o |
---|
[f7d3215] | 434 | |
---|
[34e1494] | 435 | # implicit rule for c++ test |
---|
| 436 | # convient for testing the testsuite itself but not actuall used |
---|
[e16797c] | 437 | % : %.cpp |
---|
[e2887a9] | 438 | ${PRETTY_PATH} ${CXXCOMPILE} ${shell realpath --relative-to=${srcdir} ${<}} -o ${abspath ${@}} |
---|
[4c8f86b3] | 439 | |
---|
[f7d3215] | 440 | #------------------------------------------------------------------------------ |
---|
[34e1494] | 441 | # TARGETS WITH CUSTOM FLAGS |
---|
[e16797c] | 442 | #------------------------------------------------------------------------------ |
---|
[34e1494] | 443 | # custom libs |
---|
| 444 | gmp_FLAGSLD= -lgmp |
---|
[dc8511c] | 445 | |
---|
[e16797c] | 446 | #------------------------------------------------------------------------------ |
---|
[34e1494] | 447 | # Generated code |
---|
| 448 | GENERATED_CODE = declarationSpecifier gccExtensions extension attributes functions KRfunctions |
---|
[e2887a9] | 449 | ${GENERATED_CODE} : % : %.cfa ${CFACCBIN} |
---|
| 450 | ${CFACOMPILETEST} -CFA -XCFA -p -c -fsyntax-only -o ${abspath ${@}} |
---|
[34e1494] | 451 | |
---|
[e16797c] | 452 | #------------------------------------------------------------------------------ |
---|
| 453 | # CUSTOM TARGET |
---|
| 454 | #------------------------------------------------------------------------------ |
---|
[66812dd] | 455 | # tests that just validate syntax and compiler output should be compared to stderr |
---|
[e2887a9] | 456 | CFACOMPILE_SYNTAX = ${CFACOMPILETEST} -Wno-unused-variable -Wno-unused-label -c -fsyntax-only -o ${abspath ${@}} |
---|
[40c81e5] | 457 | |
---|
[afb15cf] | 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 | |
---|
[e2887a9] | 462 | ${SYNTAX_ONLY_CODE} : % : %.cfa ${CFACCBIN} |
---|
| 463 | ${CFACOMPILE_SYNTAX} |
---|
| 464 | ${if ${test}, cp ${test} ${abspath ${@}}, } |
---|
[87fc1b4] | 465 | |
---|
[34e1494] | 466 | # expected failures |
---|
[e6cfb4e2] | 467 | # use custom target since they require a custom define *and* have a name that doesn't match the file |
---|
[a5aa5bf] | 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 | |
---|
[0b8c951d] | 481 | array-collections/dimexpr-match-c-ERRS : array-collections/dimexpr-match-c.cfa |
---|
[0f4ac10] | 482 | ${CFACOMPILE_SYNTAX} -DERRS |
---|
| 483 | -cp ${test} ${abspath ${@}} |
---|
| 484 | |
---|
[0b8c951d] | 485 | array-collections/dimexpr-match-cfa-ERRS : array-collections/dimexpr-match-cfa.cfa |
---|
[0f4ac10] | 486 | ${CFACOMPILE_SYNTAX} -DERRS |
---|
| 487 | -cp ${test} ${abspath ${@}} |
---|
| 488 | |
---|
[e2887a9] | 489 | alloc-ERROR : alloc.cfa ${CFACCBIN} |
---|
| 490 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 491 | -cp ${test} ${abspath ${@}} |
---|
[b93a3de] | 492 | |
---|
[e2887a9] | 493 | init1-ERROR : init1.cfa ${CFACCBIN} |
---|
| 494 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 495 | -cp ${test} ${abspath ${@}} |
---|
[ee858bf] | 496 | |
---|
[e2887a9] | 497 | typedefRedef-ERR1 : typedefRedef.cfa ${CFACCBIN} |
---|
| 498 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 499 | -cp ${test} ${abspath ${@}} |
---|
[e2c70ab] | 500 | |
---|
[e2887a9] | 501 | nested-types-ERR1 : nested-types.cfa ${CFACCBIN} |
---|
| 502 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 503 | -cp ${test} ${abspath ${@}} |
---|
[49e1275] | 504 | |
---|
[e2887a9] | 505 | nested-types-ERR2 : nested-types.cfa ${CFACCBIN} |
---|
| 506 | ${CFACOMPILE_SYNTAX} -DERR2 |
---|
| 507 | -cp ${test} ${abspath ${@}} |
---|
[49e1275] | 508 | |
---|
[e2887a9] | 509 | raii/memberCtors-ERR1 : raii/memberCtors.cfa ${CFACCBIN} |
---|
| 510 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 511 | -cp ${test} ${abspath ${@}} |
---|
[cdbfab0] | 512 | |
---|
[e2887a9] | 513 | raii/ctor-autogen-ERR1 : raii/ctor-autogen.cfa ${CFACCBIN} |
---|
| 514 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 515 | -cp ${test} ${abspath ${@}} |
---|
[80e8582] | 516 | |
---|
[e2887a9] | 517 | raii/dtor-early-exit-ERR1 : raii/dtor-early-exit.cfa ${CFACCBIN} |
---|
| 518 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 519 | -cp ${test} ${abspath ${@}} |
---|
[80e8582] | 520 | |
---|
[e2887a9] | 521 | raii/dtor-early-exit-ERR2 : raii/dtor-early-exit.cfa ${CFACCBIN} |
---|
| 522 | ${CFACOMPILE_SYNTAX} -DERR2 |
---|
| 523 | -cp ${test} ${abspath ${@}} |
---|
[e16797c] | 524 | |
---|
[64f3b9f] | 525 | raii/partial-ERR1 : raii/partial.cfa ${CFACCBIN} |
---|
| 526 | ${CFACOMPILE_SYNTAX} -DERR1 |
---|
| 527 | -cp ${test} ${abspath ${@}} |
---|
| 528 | |
---|
[5715d43] | 529 | # Exception Tests |
---|
| 530 | # Test with libcfathread; it changes how storage works. |
---|
| 531 | |
---|
[e2887a9] | 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 ${@}} |
---|
[5715d43] | 535 | |
---|
[673eb7a] | 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) |
---|
[e2887a9] | 538 | linking/linkerror : linking/linkerror.cfa ${CFACCBIN} |
---|
| 539 | ${CFACOMPILETEST} -O0 -c -o ${abspath ${@}}.o |
---|
| 540 | ${CFACCLINK} -O0 ${@}.o -o ${abspath ${@}} |
---|
| 541 | rm ${abspath ${@}}.o |
---|
[673eb7a] | 542 | |
---|
[34e1494] | 543 | #------------------------------------------------------------------------------ |
---|
| 544 | # Other targets |
---|