3 FILES
=f00.rs f01.rs f02.rs f03.rs f04.rs f05.rs f06.rs f07.rs \
4 f08.rs f09.rs f10.rs f11.rs f12.rs f13.rs f14.rs f15.rs \
5 f16.rs f17.rs f18.rs f19.rs f20.rs f21.rs f22.rs f23.rs \
9 # all: $(patsubst %.rs,$(TMPDIR)/%.dot,$(FILES)) $(patsubst %.rs,$(TMPDIR)/%.pp,$(FILES))
10 all: $(patsubst %.rs
,$(TMPDIR
)/%.
check,$(FILES
))
13 RUSTC_LIB
=$(RUSTC
) --crate-type
=lib
15 define FIND_LAST_BLOCK
16 LASTBLOCKNUM_
$(1) := $(shell $(RUSTC_LIB
) -Z unstable-options
--pretty
=expanded
,identified
$(1) \
19 | sed
-e
's@.*/\* block \([0-9]*\) \*/.*@\1@')
22 ifeq ($(findstring rustc
,$(RUSTC
)),)
23 $(error Must set RUSTC
)
27 $(RUSTC_LIB
) --pretty
=expanded
,identified
$< -o
$@
30 $(eval
$(call FIND_LAST_BLOCK
,$<))
31 $(RUSTC_LIB
) -Z unstable-options
--unpretty flowgraph
,unlabelled
=$(LASTBLOCKNUM_
$<) $< -o
$@.tmp
32 cat
$@.tmp | sed
-e
's@ (id=[0-9]*)@@g' \
33 -e
's@\[label=""\]@@' \
34 -e
's@digraph [a-zA-Z0-9_]* @digraph block @' \
37 $(TMPDIR
)/%.
check: %.rs
$(TMPDIR
)/%.dot
38 diff
-u
$(patsubst %.rs
,$(TMPDIR
)/%.dot
,$<) $(patsubst %.rs
,%.dot-expected.dot
,$<)