~ubuntu-branches/ubuntu/wily/tcc/wily-proposed

« back to all changes in this revision

Viewing changes to .pc/0003-Filter-out-warning-about-softfloat-in-tests2.patch/tests/tests2/Makefile

  • Committer: Package Import Robot
  • Author(s): Matteo Cypriani
  • Date: 2014-10-17 15:29:00 UTC
  • Revision ID: package-import@ubuntu.com-20141017152900-mfkegu6k9n220ys3
Tags: 0.9.27~git20140923.9d7fb33-3
New patch to fix tests2 on armel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TOP = ../..
 
2
include $(TOP)/Makefile
 
3
 
 
4
# clear CFLAGS and LDFLAGS
 
5
CFLAGS :=
 
6
LDFLAGS :=
 
7
 
 
8
ifdef CONFIG_WIN32
 
9
 TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir)/include -L$(TOP)
 
10
else
 
11
 TCCFLAGS = -B$(TOP) -I$(top_srcdir)/include -lm
 
12
endif
 
13
 
 
14
ifeq ($(TARGETOS),Darwin)
 
15
 CFLAGS += -Wl,-flat_namespace,-undefined,warning
 
16
 TCCFLAGS += -D_ANSI_SOURCE
 
17
 export MACOSX_DEPLOYMENT_TARGET:=10.2
 
18
endif
 
19
 
 
20
TCC = $(TOP)/tcc $(TCCFLAGS)
 
21
 
 
22
TESTS = \
 
23
 00_assignment.test \
 
24
 01_comment.test \
 
25
 02_printf.test \
 
26
 03_struct.test \
 
27
 04_for.test \
 
28
 05_array.test \
 
29
 06_case.test \
 
30
 07_function.test \
 
31
 08_while.test \
 
32
 09_do_while.test \
 
33
 10_pointer.test \
 
34
 11_precedence.test \
 
35
 12_hashdefine.test \
 
36
 13_integer_literals.test \
 
37
 14_if.test \
 
38
 15_recursion.test \
 
39
 16_nesting.test \
 
40
 17_enum.test \
 
41
 18_include.test \
 
42
 19_pointer_arithmetic.test \
 
43
 20_pointer_comparison.test \
 
44
 21_char_array.test \
 
45
 22_floating_point.test \
 
46
 23_type_coercion.test \
 
47
 24_math_library.test \
 
48
 25_quicksort.test \
 
49
 26_character_constants.test \
 
50
 27_sizeof.test \
 
51
 28_strings.test \
 
52
 29_array_address.test \
 
53
 30_hanoi.test \
 
54
 31_args.test \
 
55
 32_led.test \
 
56
 33_ternary_op.test \
 
57
 34_array_assignment.test \
 
58
 35_sizeof.test \
 
59
 36_array_initialisers.test \
 
60
 37_sprintf.test \
 
61
 38_multiple_array_index.test \
 
62
 39_typedef.test \
 
63
 40_stdio.test \
 
64
 41_hashif.test \
 
65
 42_function_pointer.test \
 
66
 43_void_param.test \
 
67
 44_scoped_declarations.test \
 
68
 45_empty_for.test \
 
69
 46_grep.test \
 
70
 47_switch_return.test \
 
71
 48_nested_break.test \
 
72
 49_bracket_evaluation.test \
 
73
 50_logical_second_arg.test \
 
74
 51_static.test \
 
75
 52_unnamed_enum.test \
 
76
 54_goto.test \
 
77
 55_lshift_type.test \
 
78
 56_btype_excess-1.test \
 
79
 57_btype_excess-2.test \
 
80
 58_function_redefinition.test \
 
81
 59_function_array.test \
 
82
 60_enum_redefinition.test \
 
83
 61_undefined_enum.test \
 
84
 62_enumerator_redefinition.test \
 
85
 63_local_enumerator_redefinition.test \
 
86
 64_macro_nesting.test \
 
87
 65_macro_concat_start.test \
 
88
 66_macro_concat_end.test \
 
89
 67_macro_concat.test \
 
90
 68_macro_param_list_err_1.test \
 
91
 69_macro_param_list_err_2.test
 
92
 
 
93
# 34_array_assignment.test -- array assignment is not in C standard
 
94
 
 
95
SKIP = 34_array_assignment.test
 
96
 
 
97
# some tests do not pass on all platforms, remove them for now
 
98
ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float
 
99
 SKIP += 22_floating_point.test
 
100
endif
 
101
ifeq ($(TARGETOS),Darwin)
 
102
 SKIP += 40_stdio.test
 
103
endif
 
104
ifdef CONFIG_WIN32
 
105
 SKIP += 24_math_library.test # don't have round()
 
106
 SKIP += 28_strings.test # don't have r/index() / strings.h
 
107
endif
 
108
 
 
109
# Some tests might need arguments
 
110
ARGS =
 
111
31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5
 
112
46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c
 
113
 
 
114
all test: $(filter-out $(SKIP),$(TESTS))
 
115
 
 
116
%.test: %.c %.expect
 
117
        @echo Test: $*...
 
118
 
 
119
        @$(TCC) -run $< $(ARGS) >$*.output 2>&1 || true
 
120
        @diff -bu $*.expect $*.output && rm -f $*.output
 
121
 
 
122
        @($(TCC) $< -o $*.exe && ./$*.exe $(ARGS)) >$*.output2 2>&1 || true
 
123
        @diff -bu $*.expect $*.output2 && rm -f $*.output2 $*.exe
 
124
 
 
125
clean:
 
126
        rm -vf fred.txt *.output* *.exe