--- parser3/tests/Makefile 2003/03/06 08:14:53 1.1.2.4 +++ parser3/tests/Makefile 2015/05/27 13:24:35 1.5 @@ -1,36 +1,38 @@ ifdef COMSPEC - PARSER_EXECUTABLE=../src/targets/cgi/debug/parser3.exe + PARSER_DIR=../src/targets/cgi/release + PARSER_EXECUTABLE=$(PARSER_DIR)/parser3.exe else - PARSER_EXECUTABLE=../src/targets/cgi/parser3 + PARSER_DIR=../src/targets/cgi + PARSER_EXECUTABLE=$(PARSER_DIR)/parser3 endif +PARSER_CONFIG=results/auto.p RUN_PARSER=./run_parser.sh -DIFF=diff -ECHO=echo +DIFF=diff -b RM=rm # -OUTPUTS=$(patsubst %.html,outputs/%.processed,$(wildcard *.html)) -RESULTS=$(patsubst %.html,results/%.processed,$(wildcard *.html)) +OUTPUTS=$(patsubst %.html,outputs/%.processed,$(sort $(wildcard *.html))) +RESULTS=$(patsubst %.html,results/%.processed,$(sort $(wildcard *.html))) -outputs/%.processed: %.html Makefile $(RUN_PARSER) $(PARSER_EXECUTABLE) - $(RUN_PARSER) $(PARSER_EXECUTABLE) $< > $@ +outputs/%.processed: %.html + $(RUN_PARSER) $(PARSER_EXECUTABLE) $< $(PARSER_CONFIG) > $@ -.PHONY: FORCE all tests clean +.PHONY: FORCE all tests clean install install-exec install-data results/%.processed: outputs/%.processed FORCE - @$(DIFF) $< $@ - -all: - @$(ECHO) this folder contains Parser3 tests, you can run them by 'make tests' command + -$(DIFF) $< $@ tests: outputs compares outputs: $(OUTPUTS) compares: $(RESULTS) - @$(ECHO) All tests passed OK clean: $(RM) -f outputs/*.processed + +install: +install-exec: +install-data: