2 if [ -x ../../../gas/as-new ]; then \
3 echo ../../../gas/as-new ; \
5 echo $(target_alias)-as ; \
9 if [ -x ../../../ld/ld-new ]; then \
10 echo ../../../ld/ld-new ; \
12 echo $(target_alias)-ld ; \
16 if [ -x ../../../sim/v850/run ]; then \
17 echo ../../../sim/v850/run ; \
19 echo $(target_alias)-run ; \
23 check: sanity $(TESTS)
25 @eval echo AS_FOR_TARGET=$(AS_FOR_TARGET)
26 @eval echo LD_FOR_TARGET=$(LD_FOR_TARGET)
27 @eval echo RUN_FOR_TARGET=$(RUN_FOR_TARGET)
34 # Rules for running the tests
36 .SUFFIXES: .ok .run .hi .ko .ti
40 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
43 rm -f tmp-$* $*.hi diff-$*
45 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$*
46 echo 'Hello World!' | diff - tmp-$* > diff-$*
47 cat tmp-$* diff-$* > $*.hi
52 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $*.run > tmp-$* ; \
53 if [ $$? -eq 47 ] ; then \
63 $(RUN_FOR_TARGET) $(RUNFLAGS_FOR_TARGET) $(INTFLAGS_FOR_TARGET) $*.run > tmp-$*
64 test `cat tmp-$* | wc -l` -eq 10 < /dev/null
65 test `grep Tick tmp-$* | wc -l` -eq 10 < /dev/null
69 # Rules for building the test
70 # Preference is for obtaining the executable (.run) from a prebuilt image
72 .SUFFIXES: .uue .s .S .run
74 head $* | grep $*.run > /dev/null
77 uuencode < $*.run $*.run > $*.u
79 $(LD_FOR_TARGET) $(LDFLAGS_FOR_TARGET) -o $*.run $*.o
81 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.s -o $*.o
83 $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) -I$(srcdir) $(srcdir)/$*.S -o $*.o
86 Makefile: Makefile.in config.status
87 $(SHELL) ./config.status
89 config.status: configure
90 $(SHELL) ./config.status --recheck