Remove the 'round' counter from the hashconsed configurations.
[tatoo.git] / Remakefile.in
index 1958a02..3f16f26 100644 (file)
@@ -6,11 +6,11 @@ OCAMLFINDFLAGS = -syntax $(OCAMLFINDSYNTAX) -package $(OCAMLFINDPACKAGES)  \
        $(OCAMLFINDPPOPTS) $(OCAMLFINDINCLUDES)
 OCAMLFINDLINKFLAGS = -linkpkg
 ODEP=tools/odeps.sh @OCAMLDEP@
-BIN=@PACKAGE_TARNAME@
+PACKAGE=@PACKAGE_TARNAME@
+BIN=src/@PACKAGE_TARNAME@.native@EXE@
 EXE=@EXE@
 
-all:
-       @REMAKE@ src/@PACKAGE_TARNAME@.native@EXE@
+all: $(BIN)
 
 tools: tools/xml_diff.native@EXE@ tools/XPathEval.class
 
@@ -40,7 +40,7 @@ clean:
                done
        done
 
-distclean: clean
+distclean: clean test_clean
        rm -rf config.status configure config.log autom4te.cache .remake Remakefile remake
 
 %.class: %.java
@@ -148,35 +148,37 @@ distclean: clean
 
 ## Tests
 
-test_suite:
+test:
        for i in tests/*.xml
        do
                @REMAKE@ "$i".summary
        done
 
+test_clean:
+       rm -rf tests/*.summary tests/*.results/*_"$PACKAGE".*
 
 %.summary:
                base="${1%.xml.summary}"
-               @REMAKE@ "$base".xml "$base".xml.queries tools src/@PACKAGE_TARNAME@.native@EXE@ 
+               @REMAKE@ "$base".xml "$base".xml.queries tools "$BIN"
                rm -f "$1"
                cat "$base".xml.queries | grep -v '^#' | while read q query; do
                        echo -n "$base"".xml $q $query ... "
                        REF="$base".xml.results/"$q"_jaxp.xml
                        @REMAKE@ "$REF"
-                       OUTPUT="$base".xml.results/"$q"_@PACKAGE_TARNAME@.xml
-                       LOG="$base".xml.results/"$q"_@PACKAGE_TARNAME@.log
+                       OUTPUT="$base".xml.results/"$q"_"$PACKAGE".xml
+                       LOG="$base".xml.results/"$q"_"$PACKAGE".log
                        src/@PACKAGE_TARNAME@.native@EXE@ -s "$base".xml \
                                "$query" "$OUTPUT" > "$LOG" 2>&1
                        echo "Query: $q : $query" >> "$1"
                        cat  "$LOG" | grep '^STATS' >> "$1"
                        echo -n "Diff: " >> "$1"
-                       tools/xml_diff.native "$REF" "$OUTPUT" >/dev/null 2>&1
-                       if [ "$?" -eq 0 ]; then
+                       if tools/xml_diff.native "$REF" "$OUTPUT" >/dev/null 2>&1; then
                                echo ok
                                echo ok >> "$1"
                        else
                                echo failed
                                echo failed >> "$1"
+                               exit 1
                        fi
                        echo '-------------------------------------------' >> "$1"
                done