man_MANS = re2c.1
#CXXFLAGS = -O2 -Wall -Wno-unused -Wno-parentheses -Wno-deprecated
-#CXXFLAGS = -O2 -Wall -Wextra -pedantic -Wconversion -Wpointer-arith -Wwrite-strings -Wredundant-decls -Werror -Wunused-function -DPEDANTIC
+#CXXFLAGS = -ggdb -fno-inline -O2 -Wall -Wextra -pedantic -Wconversion -Wpointer-arith -Wwrite-strings -Wredundant-decls -Werror -Wunused-function -DPEDANTIC
YFLAGS = -d
RE2C = re2c$(EXEEXT)
EXTRA_DIST = $(EXTRA_SRC) makerpm.in re2c.spec.in re2c.spec README.in config_w32.h.in
EXTRA_ZIP = $(EXTRA_SRC) config_w32.h *.sln *.vcproj re2c.rules
-dist-hook: re2c.spec
+dist-hook: vtest re2c.spec
rm -rf `find $(distdir)/doc -name .svn`
rm -rf `find $(distdir)/examples -name .svn`
rm -rf `find $(distdir)/test -name .svn -o -name .cvsignore`
test: all $(TESTS)
test -x $(TESTS) || chmod +x $(TESTS)
./$(TESTS)
+
+vtest: all $(TESTS)
+ test -x $(TESTS) || chmod +x $(TESTS)
+ ./$(TESTS) --valgrind
result=0
errcnt=0
tstcnt=0;
+if test "$1" == "--valgrind"; then
+valgrind=`which valgrind`
+shift
+else
+valgrind=
+fi
diff -u $0 $0 >/dev/null 2>&1 && diff='diff -u' || diff='diff'
#diff="${diff} -I '#line [0-9]*'"
if uname|grep -q -i 'CYGWIN' && test -x "@WINBUILDDIR@/re2c.exe"; then
re2c='@WINBUILDDIR@/re2c.exe'
else
-valgrind=`which valgrind`
-if test -n "${valgrind}"; then
- valgrind="${valgrind} -q "
- echo "Using valgrind"
-fi
-re2c="${valgrind}@builddir@/re2c"
+re2c='@builddir@/re2c'
fi
if test ! -x "${re2c}"; then
echo "Cannot find re2c executable (${re2c})."
fi
+if test -n "${valgrind}"; then
+ valgrind="${valgrind} -q "
+ echo "Using valgrind"
+fi
+re2c="${valgrind}${re2c}"
echo "Testing: ${re2c}"
if ${re2c} -v|grep -q 're2c @PACKAGE_VERSION@ *\r*'; then
echo "Version: @PACKAGE_VERSION@"