2005-04-24 08:51:33 +00:00
|
|
|
include $(TOP)/config.mk
|
|
|
|
|
|
|
|
check: $(BIN)
|
2018-01-21 01:14:49 +09:00
|
|
|
(cd $(BINDIR) ;\
|
2005-04-24 08:51:33 +00:00
|
|
|
expected="expected" ;\
|
|
|
|
if [ -f "expected" -o -f "expected.$(GLASGOW_HASKELL)" ] ;\
|
|
|
|
then \
|
|
|
|
actual_out="/tmp/hs-plugins-actual.out.$$$$" ;\
|
|
|
|
diff_out="/tmp/hs-plugins.diff.$$$$" ;\
|
|
|
|
$(REALBIN) > $$actual_out 2>&1 || true ;\
|
|
|
|
if [ -f "expected.$(GLASGOW_HASKELL)" ] ; then \
|
|
|
|
expected="expected.$(GLASGOW_HASKELL)" ;\
|
|
|
|
fi ;\
|
|
|
|
diff -u $$expected $$actual_out > $$diff_out || true ;\
|
|
|
|
if [ -s "$$diff_out" ] ; then \
|
|
|
|
echo "failed with:" ;\
|
|
|
|
cat "$$diff_out" | sed '1,3d' ;\
|
|
|
|
else \
|
|
|
|
echo "ok." ;\
|
|
|
|
fi ;\
|
|
|
|
rm $$actual_out $$diff_out ;\
|
|
|
|
else \
|
|
|
|
$(REALBIN) 2>&1 || true ;\
|
|
|
|
fi)
|