Import hs-plugins cvs
This commit is contained in:
24
examples/check.mk
Normal file
24
examples/check.mk
Normal file
@ -0,0 +1,24 @@
|
||||
include $(TOP)/config.mk
|
||||
|
||||
check: $(BIN)
|
||||
@(cd $(BINDIR) ;\
|
||||
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)
|
Reference in New Issue
Block a user