openbsd-ports/devel/alex/patches/patch-Makefile
avsm 3d8516a7df Initial import of alex-2.0
From: Don Stewart <dons at cse.unsw.edu.au>

--
Alex is a tool for generating lexical analysers in Haskell, given
a description of the tokens to be recognised in the form of regular
expressions. It is similar to the tool lex or flex for C/C++.
2003-08-18 18:29:04 +00:00

29 lines
683 B
Plaintext

Provide a useful regress target.
--- Makefile.orig Sat Jul 26 00:39:17 2003
+++ Makefile Thu Aug 14 13:07:07 2003
@@ -420,3 +420,23 @@
# -----------------------------------------------------------------------------
+EXP=alex.expected
+OUT=alex.actual
+
+check::
+ @( cd alex/tests/ ; ${MAKE} 2>&1 | tee ../../${OUT}.raw )
+ @sed '1d;$$d' ${OUT}.raw > ${OUT}
+ @(if cmp -s ${EXP} ${OUT} ; then \
+ echo ;\
+ echo "All is good!" ; \
+ echo ;\
+ else \
+ echo ;\
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\
+ echo "Unexpected regress results!" ;\
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\
+ echo ;\
+ echo "here is a diff:" ;\
+ diff -u ${EXP} ${OUT} ;\
+ fi ; exit 0 )
+