1-include ../tools.mk 2 3# Attempt to build this dependency tree: 4# 5# A.1 A.2 6# |\ | 7# | \ | 8# B \ C 9# \ | / 10# \|/ 11# D 12# 13# Note that A.1 and A.2 are crates with the same name. 14 15all: 16 $(RUSTC) -C metadata=1 -C extra-filename=-1 a.rs 17 $(RUSTC) -C metadata=2 -C extra-filename=-2 a.rs 18 $(RUSTC) b.rs --extern a=$(TMPDIR)/liba-1.rlib 19 $(RUSTC) c.rs --extern a=$(TMPDIR)/liba-2.rlib 20 @echo before 21 $(RUSTC) --cfg before d.rs --extern a=$(TMPDIR)/liba-1.rlib 22 $(call RUN,d) 23 @echo after 24 $(RUSTC) --cfg after d.rs --extern a=$(TMPDIR)/liba-1.rlib 25 $(call RUN,d) 26