* Numerous changes & small bug fixes in PKE sim code and test suite.
[deliverable/binutils-gdb.git] / sim / testsuite / sky / Makefile.in
1 # Makefile for regression testing the sky simulator.
2
3
4 VPATH = @srcdir@
5 srcdir = @srcdir@
6 srcroot = $(srcdir)/..
7
8 prefix = @prefix@
9 exec_prefix = @exec_prefix@
10
11 host_alias = @host_alias@
12 target_alias = @target_alias@
13 program_transform_name = @program_transform_name@
14 build_canonical = @build@
15 host_canonical = @host@
16 target_canonical = @target@
17 target_cpu = @target_cpu@
18
19
20 SHELL = /bin/sh
21 SUBDIRS = @subdirs@
22 RPATH_ENVVAR = @RPATH_ENVVAR@
23
24 EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
25 echo $${rootme}/../../expect/expect ; \
26 else echo expect ; fi`
27
28 RUNTEST = $(RUNTEST_FOR_TARGET)
29
30 RUNTESTFLAGS =
31
32 RUNTEST_FOR_TARGET = `\
33 if [ -f $${srcdir}/../../../dejagnu/runtest ]; then \
34 echo $${srcdir}/../../../dejagnu/runtest; \
35 else \
36 if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
37 echo runtest; \
38 else \
39 t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
40 fi; \
41 fi`
42
43
44 AS_FOR_TARGET = `\
45 if [ -x ../../../gas/as-new ]; then \
46 echo ../../../gas/as-new ; \
47 else \
48 echo $(target_alias)-as ; \
49 fi`
50
51 LD_FOR_TARGET = `\
52 if [ -x ../../../ld/ld-new ]; then \
53 echo ../../../ld/ld-new ; \
54 else \
55 echo $(target_alias)-ld ; \
56 fi`
57
58 RUNOPTS =
59
60 RUN_FOR_TARGET = `\
61 if [ -x ../../../sim/mips/run ]; then \
62 echo ../../../sim/mips/run ; \
63 else \
64 echo $(target_alias)-run ; \
65 fi` $(RUNOPTS)
66
67 GCC_FOR_TARGET = `\
68 if [ -x ../../../gcc/xgcc ]; then \
69 echo ../../../gcc/xgcc ; \
70 else \
71 echo $(target_alias)-gcc ; \
72 fi`
73
74 C_GEN = /build/sky-tools/c_gen.pl
75
76 .SUFFIXES: .trc .c .run .ok .vif0out .vif0ok .vif0expect .vif1out .vif1ok .vif1expect .uu
77
78 TESTS = \
79 t-pke1.c \
80 t-pke1.run \
81 t-pke1.vif0ok \
82 t-pke2.c \
83 t-pke2.run \
84 t-pke2.vif1ok \
85 t-pke3.c \
86 t-pke3.run \
87 t-pke3.ok
88
89 check: sanity $(TESTS)
90 sanity:
91 @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
92 @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
93 @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
94 @eval echo GCC_FOR_TARGET = $(GCC_FOR_TARGET)
95
96
97 # Rules for running the tests
98
99 .run.ok:
100 rm -f tmp-$* $*.hi
101 ulimit -t 5 ; $(RUN_FOR_TARGET) $< > tmp-$*
102 mv tmp-$* $*.ok
103 .run.ko:
104 rm -f tmp-$* $*.ko
105 set +e ; \
106 ulimit -t 5 ; $(RUN_FOR_TARGET) $< > tmp-$* ; \
107 if [ $$? -ne 0 ] ; then \
108 exit 0 ; \
109 else \
110 exit 1 ; \
111 fi
112 mv tmp-$* $*.ko
113 .vif0out.vif0ok:
114 diff $(srcdir)/$*.vif0expect $<
115 touch $@
116 .vif1out.vif1ok:
117 diff $(srcdir)/$*.vif1expect $<
118 touch $@
119
120 # Rules for building all the tests
121
122 .trc.c:
123 $(C_GEN) $< $@
124 .c.run:
125 $(GCC_FOR_TARGET) -Tr5900.ld -o $@ $<
126 .uu.run:
127 uudecode $< > $@
128 .run.vif0out:
129 rm -f $@
130 -env VIF0_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
131 .run.vif1out:
132 rm -f $@
133 -env VIF1_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
134
135
136
137 #
138 # Standard
139 #
140 clean mostlyclean:
141 -rm -f *~ core *.o a.out *.x *.grt
142 -rm -f *.vif*out *.ok tmp-*
143 rm -f $(TESTS)
144 # if [ x"${SUBDIRS}" != x ] ; then \
145 # for dir in ${SUBDIRS}; \
146 # do \
147 # echo "$$dir:"; \
148 # if [ -d $$dir ]; then \
149 # (cd $$dir; $(MAKE) clean); \
150 # fi; \
151 # done ; \
152 # else true; fi
153
154 distclean maintainer-clean realclean: clean
155 -rm -f *~ core
156 -rm -f Makefile config.status *-init.exp
157 -rm -fr *.log summary detail *.plog *.sum *.psum site.*
158 # if [ x"${SUBDIRS}" != x ] ; then \
159 # for dir in ${SUBDIRS}; \
160 # do \
161 # echo "$$dir:"; \
162 # if [ -d $$dir ]; then \
163 # (cd $$dir; $(MAKE) distclean); \
164 # fi; \
165 # done ; \
166 # else true; fi
167
168 Makefile : Makefile.in config.status
169 $(SHELL) config.status
170
171 config.status: configure
172 $(SHELL) config.status --recheck
This page took 0.038401 seconds and 5 git commands to generate.