| 1 |
# |
| 2 |
# Torture-tester for the INTERCAL compiler |
| 3 |
# |
| 4 |
# Type 'make' to test-compile the pit programs and run a regression check |
| 5 |
|
| 6 |
ICKENV = ICKINCLUDEDIR=../src ICKCSKELDIR=../src ICKSYSDIR=lib ICKLIBDIR=.. |
| 7 |
ICK = ../ick |
| 8 |
ICKOPTS = -b |
| 9 |
PIT = . |
| 10 |
|
| 11 |
BASE2SOURCES = \ |
| 12 |
$(PIT)/beer.i \ |
| 13 |
$(PIT)/bubble.i \ |
| 14 |
$(PIT)/change.i \ |
| 15 |
$(PIT)/flonck.i \ |
| 16 |
$(PIT)/fft.i \ |
| 17 |
$(PIT)/guess.i \ |
| 18 |
$(PIT)/icat.i \ |
| 19 |
$(PIT)/iching1.i \ |
| 20 |
$(PIT)/iching2.i \ |
| 21 |
$(PIT)/ins.i \ |
| 22 |
$(PIT)/interfunge \ |
| 23 |
$(PIT)/lib/lib2.i \ |
| 24 |
$(PIT)/lib/numio.i \ |
| 25 |
$(PIT)/lib/plus.i \ |
| 26 |
$(PIT)/lib/syslib.i \ |
| 27 |
$(PIT)/lib/syslib3.i \ |
| 28 |
$(PIT)/lib/syslib4.i \ |
| 29 |
$(PIT)/lib/syslib5.i \ |
| 30 |
$(PIT)/lib/syslib6.i \ |
| 31 |
$(PIT)/lib/syslib7.i \ |
| 32 |
$(PIT)/life.i \ |
| 33 |
$(PIT)/life2.i \ |
| 34 |
$(PIT)/pi.i \ |
| 35 |
$(PIT)/pow.i \ |
| 36 |
$(PIT)/quine \ |
| 37 |
$(PIT)/pass.i \ |
| 38 |
$(PIT)/primes.i \ |
| 39 |
$(PIT)/random.i \ |
| 40 |
$(PIT)/random2.i \ |
| 41 |
$(PIT)/rot13.i \ |
| 42 |
$(PIT)/rot13b.i \ |
| 43 |
$(PIT)/sample.i \ |
| 44 |
$(PIT)/sort.i \ |
| 45 |
$(PIT)/tests/ais1.i \ |
| 46 |
$(PIT)/tests/ais2.i \ |
| 47 |
$(PIT)/tests/compucome.i \ |
| 48 |
$(PIT)/tests/hello.i \ |
| 49 |
$(PIT)/tests/ignorret.i \ |
| 50 |
$(PIT)/tests/ignorearray.i \ |
| 51 |
$(PIT)/tests/iogerunds.i \ |
| 52 |
$(PIT)/tests/limits.i \ |
| 53 |
$(PIT)/tests/permute.i \ |
| 54 |
$(PIT)/tests/sink.i \ |
| 55 |
$(PIT)/tests/onceagain.i \ |
| 56 |
$(PIT)/tests/test1.i \ |
| 57 |
$(PIT)/tests/test16bit.i \ |
| 58 |
$(PIT)/tests/test2.i \ |
| 59 |
$(PIT)/tests/testarray.i \ |
| 60 |
$(PIT)/tests/testcf.i \ |
| 61 |
$(PIT)/tests/testcreate .i \ |
| 62 |
$(PIT)/tests/testlib2.i \ |
| 63 |
$(PIT)/tests/testonce.i \ |
| 64 |
$(PIT)/tests/testsplat.i \ |
| 65 |
$(PIT)/tests/whileadd.i \ |
| 66 |
$(PIT)/tpk.i \ |
| 67 |
$(PIT)/unlambda.i \ |
| 68 |
$(PIT)/yapp.i |
| 69 |
|
| 70 |
BASENSOURCES = \ |
| 71 |
$(PIT)/hail_mary.3i \ |
| 72 |
$(PIT)/tests/count.3i \ |
| 73 |
$(PIT)/tests/limits3.3i \ |
| 74 |
$(PIT)/tests/testops3.3i \ |
| 75 |
$(PIT)/tests/testops5.5i |
| 76 |
|
| 77 |
SOURCES = $(BASE2SOURCES) $(BASENSOURCES) |
| 78 |
|
| 79 |
TARGETS = $(BASE2SOURCES:.i=) \ |
| 80 |
$(PIT)/hail_mary \ |
| 81 |
$(PIT)/tests/count \ |
| 82 |
$(PIT)/tests/limits3 \ |
| 83 |
$(PIT)/tests/testops3 \ |
| 84 |
$(PIT)/tests/testops5 |
| 85 |
|
| 86 |
.SUFFIXES: .i .3i .4i .5i .6i .7i |
| 87 |
|
| 88 |
%: %.i $(ICK) |
| 89 |
$(ICKENV) $(ICK) $(ICKOPTS) $< |
| 90 |
|
| 91 |
%: %.3i $(ICK) |
| 92 |
$(ICKENV) $(ICK) $(ICKOPTS) $< |
| 93 |
|
| 94 |
%: %.4i $(ICK) |
| 95 |
$(ICKENV) $(ICK) $(ICKOPTS) $< |
| 96 |
|
| 97 |
%: %.5i $(ICK) |
| 98 |
$(ICKENV) $(ICK) $(ICKOPTS) $< |
| 99 |
|
| 100 |
%: %.6i $(ICK) |
| 101 |
$(ICKENV) $(ICK) $(ICKOPTS) $< |
| 102 |
|
| 103 |
%: %.7i $(ICK) |
| 104 |
$(ICKENV) $(ICK) $(ICKOPTS) $< |
| 105 |
|
| 106 |
# For instructions on test conventions, see the header comment of regresscheck |
| 107 |
test: $(TARGETS) |
| 108 |
@$(PIT)/beer | $(PIT)/regresscheck $(PIT)/beer |
| 109 |
@file $(PIT)/beer | grep -q 'shell script' || echo "Regression test of -F (using beer) FAILED." |
| 110 |
@cat $(PIT)/bubble.tst | $(PIT)/bubble | $(PIT)/regresscheck $(PIT)/bubble |
| 111 |
@cat $(PIT)/fft-delta.tst | $(PIT)/fft | $(PIT)/regresscheck $(PIT)/fft-delta |
| 112 |
@cat $(PIT)/fft-tophat.tst | $(PIT)/fft | $(PIT)/regresscheck $(PIT)/fft-tophat |
| 113 |
@cat $(PIT)/flonck.tst | $(PIT)/flonck | $(PIT)/regresscheck $(PIT)/flonck |
| 114 |
@echo 'Hello, sailor!' | $(PIT)/regresscheck $(PIT)/icat |
| 115 |
@cat $(PIT)/interfunge.tst | $(PIT)/interfunge | $(PIT)/regresscheck $(PIT)/interfunge |
| 116 |
@echo 'A man, a plan, a canal, Panama.' | $(PIT)/rot13 | $(PIT)/regresscheck $(PIT)/rot13 |
| 117 |
@echo 'A man, a plan, a canal, Panama.' | $(PIT)/rot13b | $(PIT)/regresscheck $(PIT)/rot13b |
| 118 |
@echo "FIVE" | $(PIT)/pi | $(PIT)/regresscheck $(PIT)/pi |
| 119 |
@cat $(PIT)/pow.tst | $(PIT)/pow 2>&1 | $(PIT)/regresscheck $(PIT)/pow |
| 120 |
@cat $(PIT)/pass.tst | $(PIT)/pass | $(PIT)/regresscheck $(PIT)/pass |
| 121 |
@cp $(PIT)/quine.i $(PIT)/quine.chk; $(PIT)/quine | $(PIT)/regresscheck $(PIT)/quine; rm -f $(PIT)/quine.chk |
| 122 |
@cat $(PIT)/sort.tst | $(PIT)/sort | $(PIT)/regresscheck $(PIT)/sort |
| 123 |
@cat $(PIT)/tpk.tst | $(PIT)/tpk | $(PIT)/regresscheck $(PIT)/tpk |
| 124 |
@cat $(PIT)/unlambda.tst | $(PIT)/unlambda | $(PIT)/regresscheck $(PIT)/unlambda |
| 125 |
@cat $(PIT)/yapp.tst | $(PIT)/yapp >$(PIT)/yapptest.i && $(ICKENV) $(ICK) $(ICKOPTS) $(PIT)/yapptest.i && $(PIT)/yapptest | $(PIT)/regresscheck -c $(PIT)/yapp.tst $(PIT)/yapp; rm -f $(PIT)/yapptest.i $(PIT)/yapptest |
| 126 |
@cat $(PIT)/tests/ais1.tst | $(PIT)/tests/ais1 | $(PIT)/regresscheck $(PIT)/tests/ais1 |
| 127 |
@cat $(PIT)/tests/ais2.tst | $(PIT)/tests/ais2 | $(PIT)/regresscheck $(PIT)/tests/ais2 |
| 128 |
@$(PIT)/tests/count | $(PIT)/regresscheck $(PIT)/tests/count |
| 129 |
@$(PIT)/tests/hello | $(PIT)/regresscheck $(PIT)/tests/hello |
| 130 |
@$(PIT)/tests/ignorearray | $(PIT)/regresscheck $(PIT)/tests/ignorearray |
| 131 |
@$(PIT)/tests/ignorret | $(PIT)/regresscheck $(PIT)/tests/ignorret |
| 132 |
@$(PIT)/tests/permute | $(PIT)/regresscheck $(PIT)/tests/permute |
| 133 |
@$(PIT)/tests/sink 2>&1 | $(PIT)/regresscheck $(PIT)/tests/sink |
| 134 |
@$(PIT)/tests/test1 2>&1 | $(PIT)/regresscheck $(PIT)/tests/test1 |
| 135 |
@cat $(PIT)/tests/test2.tst | $(PIT)/tests/test2 | $(PIT)/regresscheck $(PIT)/tests/test2 |
| 136 |
@$(PIT)/tests/testonce | $(PIT)/regresscheck $(PIT)/tests/testonce |
| 137 |
@$(PIT)/tests/testsplat 2>&1 | $(PIT)/regresscheck $(PIT)/tests/testsplat |
| 138 |
@cat $(PIT)/tests/whileadd.tst | $(PIT)/tests/whileadd | $(PIT)/regresscheck $(PIT)/tests/whileadd |
| 139 |
@echo "Tests complete." |
| 140 |
|
| 141 |
|
| 142 |
# Some tests need options to compile extensions; some test extensions. |
| 143 |
$(PIT)/beer: $(PIT)/beer.i $(ICK) |
| 144 |
$(ICKENV) $(ICK) -F $(ICKOPTS) $(PIT)/beer.i |
| 145 |
$(PIT)/pass: $(PIT)/pass.i $(ICK) |
| 146 |
$(ICKENV) $(ICK) -m $(ICKOPTS) $(PIT)/pass.i |
| 147 |
$(PIT)/tests/compucome: $(PIT)/tests/compucome.i $(ICK) |
| 148 |
$(ICKENV) $(ICK) -m $(ICKOPTS) $(PIT)/tests/compucome.i |
| 149 |
$(PIT)/tests/permute: $(PIT)/tests/permute.i $(ICK) |
| 150 |
$(ICKENV) $(ICK) -m $(ICKOPTS) $(PIT)/tests/permute.i |
| 151 |
$(PIT)/tests/testcreate: $(PIT)/tests/testcreate.i $(ICK) |
| 152 |
$(ICKENV) $(ICK) -a $(ICKOPTS) $(PIT)/tests/testcreate.i |
| 153 |
$(PIT)/tests/whileadd: $(PIT)/tests/whileadd.i $(ICK) |
| 154 |
$(ICKENV) $(ICK) -m $(ICKOPTS) $(PIT)/tests/whileadd.i |
| 155 |
|
| 156 |
lines: |
| 157 |
wc -l $(SOURCES) |
| 158 |
|
| 159 |
clean: |
| 160 |
rm -f $(TARGETS) *.c *.o *~ |