Changeset f7d3215 for tests/Makefile.am


Ignore:
Timestamp:
Aug 20, 2018, 2:29:35 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
72b3605
Parents:
69efc321
Message:

Hopefully more robust fix for relative vs absolutepaths in tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r69efc321 rf7d3215  
    3838CC = @CFACC@
    3939
     40PRETTY_PATH=cd ${srcdir} &&
     41
    4042.PHONY: list .validate
    4143.INTERMEDIATE: .validate .validate.c
     
    7173# implicit rule so not all test require a rule
    7274% : %.c $(CC)
    73         $(COMPILE) $(abspath ${<}) -o ${@}
     75        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    7476
    7577declarationSpecifier: declarationSpecifier.c $(CC)
    76         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     78        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    7779
    7880gccExtensions : gccExtensions.c $(CC)
    79         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     81        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    8082
    8183extension : extension.c $(CC)
    82         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     84        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    8385
    8486attributes : attributes.c $(CC)
    85         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     87        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    8688
    8789functions: functions.c $(CC)
    88         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     90        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    8991
    9092KRfunctions : KRfunctions.c $(CC)
    91         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     93        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    9294
    9395sched-ext-parse : sched-ext-parse.c $(CC)
    94         $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
     96        $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    9597
    9698gmp : gmp.c $(CC)
    97         $(COMPILE) -lgmp $(abspath ${<}) -o ${@}
     99        $(PRETTY_PATH) $(COMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    98100
     101#builtins
     102builtins/sync: builtins/sync.c $(CC)
     103        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
     104
     105#------------------------------------------------------------------------------
     106#To make errors path independent we need to cd into the correct directories
    99107completeTypeError : completeTypeError.c $(CC)
    100         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     108        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    101109
    102110typedefRedef-ERR1: typedefRedef.c $(CC)
    103         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     111        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    104112
    105113alloc-ERROR: alloc.c $(CC)
    106         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     114        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    107115
    108116fallthrough-ERROR: fallthrough.c $(CC)
    109         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     117        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    110118
    111119nested-types-ERR1: nested-types.c $(CC)
    112         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     120        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    113121
    114122nested-types-ERR2: nested-types.c $(CC)
    115         $(COMPILE) -DERR2 $(abspath ${<}) -o ${@}
     123        $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    116124
    117125# Constructor/destructor tests
    118126raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC)
    119         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     127        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    120128
    121129raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC)
    122         $(COMPILE) -DERR2 $(abspath ${<}) -o ${@}
     130        $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    123131
    124132raii/memberCtors-ERR1: raii/memberCtors.c $(CC)
    125         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     133        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    126134
    127135raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC)
    128         $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
     136        $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
    129137
    130138# Warnings
    131139warnings/self-assignment: warnings/self-assignment.c $(CC)
    132         $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only
    133 
    134 #builtins
    135 builtins/sync: builtins/sync.c $(CC)
    136         $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only
     140        $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
Note: See TracChangeset for help on using the changeset viewer.