# When the binary changes, run the test suite, and look for changes in # the output. The changes are not fatal errors, but for a *.sc{m,h} input # file, an error produced by the binary is fatal. TSTS := $(patsubst %.scm,%.txt,$(wildcard *.scm)) \ $(patsubst %.sch,%.txt,$(wildcard *.sch)) \ $(patsubst %.lsp,%.txt,$(wildcard *.lsp)) PROG = ../dist/build/cpsa/cpsa DIFF = ../dist/build/cpsadiff/cpsadiff CPSAFLAGS = +RTS -M512m -RTS # The expected answers are in files with the .tst extension. # Analyze protocols for shapes expecting success %.txt: %.scm $(PROG) $(PROG) $(CPSAFLAGS) -o $@ $*.scm -$(DIFF) $(DIFFFLAGS) $*.tst $*.txt # Analyze protocols for shapes expecting failure %.txt: %.lsp $(PROG) -$(PROG) $(CPSAFLAGS) -o $@ $*.lsp -$(DIFF) $(DIFFFLAGS) $*.tst $*.txt # Analyze protocols for shapes expecting success using Diffie-Hellman %.txt: %.sch $(PROG) $(PROG) $(CPSAFLAGS) -a diffie-hellman -o $@ $*.sch -$(DIFF) $(DIFFFLAGS) $*.tst $*.txt # Extract shapes %_shapes.txt: %.txt ../dist/build/cpsashapes/cpsashapes $(SHAPESFLAGS) -o $@ $< # Extract shape analysis sentences %_logic.text: %.txt ../dist/build/cpsalogic/cpsalogic $(LOGICFLAGS) -o $@ $< # Annotate shapes %_annotations.txt: %_shapes.txt ../dist/build/cpsaannotations/cpsaannotations \ $(ANNOTATIONSFLAGS) -o $@ $< # Visualize output %.svg: %.txt ../dist/build/cpsagraph/cpsagraph -c -o $@ $< # Visualize output using the expanded format %.xhtml: %.txt ../dist/build/cpsagraph/cpsagraph $(GRAPHFLAGS) -o $@ $< .PRECIOUS: %.txt %_shapes.txt %_annotations.txt all: $(patsubst %.txt,%.xhtml,$(TSTS)) \ $(patsubst %.txt,%_shapes.xhtml,$(TSTS)) clean: -rm *.txt *.xhtml