Ignore:
Timestamp:
Jul 31, 2018, 2:43:04 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
642bc83
Parents:
d1e0979 (diff), 04e367c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into demangler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/Makefile.am

    rd1e0979 r3bbd012  
    1515###############################################################################
    1616
     17
    1718debug=yes
    1819
     
    2526endif
    2627
     28TEST_PY = python ${srcdir}/test.py
     29
    2730# applies to both programs
    28 DEBUG_FLAGS =
     31AM_CFLAGS = $(if $(test), 2> $(test), ) \
     32        -XCFA \
     33        -t \
     34        -B${abs_top_builddir}/src/driver \
     35        -g \
     36        -Wall \
     37        -Wno-unused-function \
     38        -quiet @CFA_FLAGS@ \
     39        -I. \
     40        -DIN_DIR="${srcdir}/.in/" \
     41        -L${abs_top_builddir}/src/libcfa \
     42        -I${abs_top_srcdir}/src/libcfa \
     43        -I${abs_top_srcdir}/src/libcfa/containers \
     44        -I${abs_top_srcdir}/src/libcfa/concurrency \
     45        -I${abs_top_srcdir}/src/libcfa/stdhdr
    2946
    30 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -I.
    3147if !BUILD_DEBUG
    32 BUILD_FLAGS += -nodebug
     48AM_CFLAGS += -nodebug
    3349else
    3450if !BUILD_RELEASE
    35 BUILD_FLAGS += -debug
     51AM_CFLAGS += -debug
    3652else
    37 BUILD_FLAGS += ${DEBUG_FLAGS}
     53AM_CFLAGS += ${DEBUG_FLAGS}
    3854endif
    3955endif
    4056
    41 TEST_FLAGS = $(if $(test), 2> $(test), )
    42 AM_CFLAGS = ${TEST_FLAGS} ${BUILD_FLAGS}
    43 CC = @CFA_BINDIR@/@CFA_NAME@
     57CC = ${abs_top_builddir}/src/driver/cfa
    4458
    4559.PHONY : list
     
    4761
    4862fstream_test_SOURCES = fstream_test.c
    49 fstream_test_CFLAGS = $(if $(test), 2>> $(test), ) ${BUILD_FLAGS}
    5063
    5164avl_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
    52 avl_test_CFLAGS = $(if $(test), 2>> $(test), ) ${BUILD_FLAGS}
    5365
    5466all-local :
    55         @+python test.py --debug=${debug} ${concurrent} ${quick_test}
     67        @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}
    5668
    5769all-tests :
    58         @+python test.py --all --debug=${debug} ${concurrent}           # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     70        @+${TEST_PY} --all --debug=${debug} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    5971
    6072clean-local :
     
    6274
    6375list :
    64         @+python test.py --list ${concurrent}
     76        @+${TEST_PY} --list ${concurrent}
    6577
    6678concurrency :
    67         @+python test.py --debug=${debug} -Iconcurrent
     79        @+${TEST_PY} --debug=${debug} -Iconcurrent
    6880
    69 .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@
    70         ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@}                              #don't use CFLAGS, this rule is not a real test
     81# SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
     82# however, here it is more complicated because it must match the dependencies based on how
     83# they are generated by gcc
     84headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
     85headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
     86headers_deps = $(addprefix %/, $(headers_real))
     87$(headers_deps) :
     88        echo "Dummy rule, should never be called"
    7189
     90# %/stdlib:
     91#       echo "Dummy rule, should never be called"
    7292
    73 % : %.c @CFA_BINDIR@/@CFA_NAME@
    74         ${CC} ${AM_CFLAGS} ${CFLAGS} ${<} -o ${@}
     93# implicit rule so not all test require a rule
     94% : %.c $(CC)
     95        echo $(headers_deps)
     96        $(COMPILE) $(abspath ${<}) -o ${@}
    7597
    76 declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@
    77         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     98declarationSpecifier: declarationSpecifier.c $(CC)
     99        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    78100
    79 gccExtensions : gccExtensions.c @CFA_BINDIR@/@CFA_NAME@
    80         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     101gccExtensions : gccExtensions.c $(CC)
     102        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    81103
    82 extension : extension.c @CFA_BINDIR@/@CFA_NAME@
    83         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     104extension : extension.c $(CC)
     105        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    84106
    85 attributes : attributes.c @CFA_BINDIR@/@CFA_NAME@
    86         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     107attributes : attributes.c $(CC)
     108        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    87109
    88 functions: functions.c @CFA_BINDIR@/@CFA_NAME@
    89         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     110functions: functions.c $(CC)
     111        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    90112
    91 KRfunctions : KRfunctions.c @CFA_BINDIR@/@CFA_NAME@
    92         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     113KRfunctions : KRfunctions.c $(CC)
     114        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    93115
    94 sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@
    95         ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     116sched-ext-parse : sched-ext-parse.c $(CC)
     117        $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
    96118
    97 gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@
    98         ${CC} ${AM_CFLAGS} ${CFLAGS} -lgmp ${<} -o ${@}
     119gmp : gmp.c $(CC)
     120        $(COMPILE) -lgmp $(abspath ${<}) -o ${@}
    99121
    100 completeTypeError : completeTypeError.c @CFA_BINDIR@/@CFA_NAME@
    101         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     122completeTypeError : completeTypeError.c $(CC)
     123        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    102124
    103 typedefRedef-ERR1: typedefRedef.c @CFA_BINDIR@/@CFA_NAME@
    104         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     125typedefRedef-ERR1: typedefRedef.c $(CC)
     126        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    105127
    106 alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@
    107         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     128alloc-ERROR: alloc.c $(CC)
     129        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    108130
    109 fallthrough-ERROR: fallthrough.c @CFA_BINDIR@/@CFA_NAME@
    110         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     131fallthrough-ERROR: fallthrough.c $(CC)
     132        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    111133
    112 nested-types-ERR1: nested-types.c @CFA_BINDIR@/@CFA_NAME@
    113         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     134nested-types-ERR1: nested-types.c $(CC)
     135        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    114136
    115 nested-types-ERR2: nested-types.c @CFA_BINDIR@/@CFA_NAME@
    116         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<} -o ${@}
     137nested-types-ERR2: nested-types.c $(CC)
     138        $(COMPILE) -DERR2 $(abspath ${<}) -o ${@}
    117139
    118140# Constructor/destructor tests
    119 raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
    120         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     141raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC)
     142        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    121143
    122 raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@
    123         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 ${<} -o ${@}
     144raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC)
     145        $(COMPILE) -DERR2 $(abspath ${<}) -o ${@}
    124146
    125 raii/memberCtors-ERR1: raii/memberCtors.c @CFA_BINDIR@/@CFA_NAME@
    126         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     147raii/memberCtors-ERR1: raii/memberCtors.c $(CC)
     148        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    127149
    128 raii/ctor-autogen-ERR1: raii/ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@
    129         ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
     150raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC)
     151        $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
    130152
    131153# Warnings
    132 warnings/self-assignment: warnings/self-assignment.c @CFA_BINDIR@/@CFA_NAME@
    133         ${CC} ${AM_CFLAGS} ${CFLAGS} ${<} 2> ${@} -fsyntax-only
     154warnings/self-assignment: warnings/self-assignment.c $(CC)
     155        $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only
    134156
    135157#builtins
    136 builtins/sync: builtins/sync.c @CFA_BINDIR@/@CFA_NAME@
    137         ${CC} ${AM_CFLAGS} ${CFLAGS} ${<} 2> ${@} -fsyntax-only
     158builtins/sync: builtins/sync.c $(CC)
     159        $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only
Note: See TracChangeset for help on using the changeset viewer.