Add test for --dep-info.

This commit is contained in:
Jack Moffitt 2013-12-11 13:08:23 -07:00
parent 9365375c7f
commit b2ccd4c3ec
5 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,11 @@
-include ../tools.mk
all:
$(RUSTC) --dep-info --lib lib.rs
sleep 1
touch foo.rs
-rm -f $(TMPDIR)/done
$(MAKE) -f Makefile.foo
rm $(TMPDIR)/done
pwd
$(MAKE) -df Makefile.foo
rm $(TMPDIR)/done && exit 1 || exit 0

View File

@ -0,0 +1,11 @@
ifeq ($(shell uname),Darwin)
LIBEXT=dylib
else
LIBEXT=so
endif
$(TMPDIR)/libfoo-b517899a-0.1.$(LIBEXT):
$(RUSTC) --dep-info --lib lib.rs
touch $(TMPDIR)/done
-include $(TMPDIR)/lib.d

View File

@ -0,0 +1 @@
pub fn bar() {}

View File

@ -0,0 +1 @@
pub fn foo() {}

View File

@ -0,0 +1,4 @@
#[pkgid="foo#0.1"];
pub mod foo;
pub mod bar;