@rm -f 1.txt diff.txt report.txt err.txt
cleanall: clean
@rm -f 0.txt
-0.txt 1.txt: $(CASL2) $(ASFILE)
+0.txt 1.txt:: $(CASL2) $(ASFILE)
@echo $(CMD) >$@; \
$(CMD) >>$@ 2>$(ERRFILE); \
if test -s $(ERRFILE); then cat err.txt >>$@; else rm -f $(ERRFILE); fi
$(OD) >>$@ 2>>$(ERRFILE); \
if test -s $(ERRFILE); then cat err.txt >>$@; else rm -f $(ERRFILE); fi
diff.txt: 1.txt
- @-diff 0.txt 1.txt >$@ 2>&1
+ @-diff -b 0.txt 1.txt >$@ 2>&1
report.txt: diff.txt
@echo -n "$(UNITNAME): Test " >$@; \
if test ! -s $^; then echo -n "Success " >>$@; rm -f $^; else echo -n "Failure " >>$@; fi; \
--- /dev/null
+../../../../casl2
+CASL2 error - 126: no source file
--- /dev/null
+include ../CMD.mk # YACASL2DIR, CASL2
+CMD = $(CASL2)
+include ../TEST.mk
-../../../../casl2 -z ../../../../as/sum_10.casl
-../../../../casl2: invalid option -- z
-Usage: ../../../../casl2 [-slLaAtTdh] [-oO<OBJECTFILE>] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE ...
+Usage: ../../../../casl2 [-slLaAtTdh] [-oO[<OBJECTFILE>]] [-M <MEMORYSIZE>] [-C <CLOCKS>] FILE1[ FILE2 ...]
CASL2FLAG = -z
CMD = $(CASL2) $(CASL2FLAG) $(ASFILE)
include ../TEST.mk
+0.txt 1.txt:: $(CASL2) $(ASFILE)
+ @if test -s $(ERRFILE); then tail -1 err.txt >$@; else rm -f $(ERRFILE); fi