chiark / gitweb /
Summaries
[vinegar-ip.git] / Makefile
index 8f4acce3e134ec491483640c6785ea41f9e831c8..792385905beb9eac81da91377faf6b239b4ca0c4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,9 @@ A_WHYS=               $(addsuffix .why,$(A_BASES))
 AN_BASES=      $(basename $(wildcard recv-*.pcap))
 AN_LOGS=       $(addsuffix .log,$(AN_BASES))
 AN_DIFFS=      $(addsuffix .diff,$(AN_BASES))
-AN_TARGETS=    $(AN_LOGS) $(AN_DIFFS)
+AN_MDIFFS=     $(addsuffix .mdiff,$(AN_BASES))
+AN_SUMMARIES=  $(addsuffix .summary,$(AN_BASES))
+AN_TARGETS=    $(AN_LOGS) $(AN_DIFFS) $(AN_MDIFFS) $(AN_SUMMARIES)
 
 INFORM=                @echo ' GENERATED THESE FILES:'; \
                echo '          $^'
@@ -81,7 +83,7 @@ scripts:      $(SCRIPT_TARGETS)
 anal analyse:  $(AN_TARGETS)
                        $(INFORM)
 
-send-all.pcap: $(A_PCAPS) Makefile
+send-all.pcap: $(A_PCAPS)
                rm -f $@
                dd if=$< ibs=24 count=1 of=$@
                set -e; for f in $(A_PCAPS); do \
@@ -92,20 +94,29 @@ send-all.why:       $(A_WHYS) Makefile
                nl -bp'^ ? ? ?[0-9]' <$@.1.tmp >$@.2.tmp
                @mv -f $@.2.tmp $@
 
-send-%.pcap send-%.why:        ./make-probes.tcl Makefile
+send-%.pcap send-%.why:        ./make-probes.tcl
        ./make-probes.tcl --write $@ --mtu $(MTU) --upto $(PERPART) \
                --source $(SOURCE) \
                --dest $(DEST) \
                 --xseed "$* $(UNIQUE)" >send-$*.why
 
-%.log:         %.pcap lnumber-tcpdump.pl Makefile
-               tcpdump -tnxvvs$$(($(MTU)+500)) -r $< >$@.1.tmp
+%.log:         %.pcap lnumber-tcpdump.pl blank-ttl-ipcsum.pl Makefile
+               tcpdump -tnxvvs$$(($(MTU)+500)) -r $< >$@.0.tmp
+               ./blank-ttl-ipcsum.pl <$@.0.tmp >$@.1.tmp
                ./lnumber-tcpdump.pl <$@.1.tmp >$@.2.tmp
                @mv -f $@.2.tmp $@
 
 recv-%.diff:   send-%.log recv-%.log
                diff -uI'^[0-9]' $^ >$@ || test $$? == 1
 
+recv-%.mdiff:  send-%.log recv-%.log
+               diff -U 1 -I'^[0-9]\|^    [     ][      ]' $^ >$@ \
+                       || test $$? == 1
+
+recv-%.summary:        recv-%.mdiff mdiff-summarise.pl
+               ./mdiff-summarise.pl <$< >$@.1.tmp
+               @mv -f $@.1.tmp $@
+
 %.sh:          %.template Makefile
                sed <$< >$@.tmp -e ' \
                        s/@@M/'$$(($(MTU)+500))'/; \