From b2ccd4c3ec099b57fbcdb7dbc36cdb08c9016b4a Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Wed, 11 Dec 2013 13:08:23 -0700 Subject: [PATCH] Add test for --dep-info. --- src/test/run-make/dep-info/Makefile | 11 +++++++++++ src/test/run-make/dep-info/Makefile.foo | 11 +++++++++++ src/test/run-make/dep-info/bar.rs | 1 + src/test/run-make/dep-info/foo.rs | 1 + src/test/run-make/dep-info/lib.rs | 4 ++++ 5 files changed, 28 insertions(+) create mode 100644 src/test/run-make/dep-info/Makefile create mode 100644 src/test/run-make/dep-info/Makefile.foo create mode 100644 src/test/run-make/dep-info/bar.rs create mode 100644 src/test/run-make/dep-info/foo.rs create mode 100644 src/test/run-make/dep-info/lib.rs diff --git a/src/test/run-make/dep-info/Makefile b/src/test/run-make/dep-info/Makefile new file mode 100644 index 00000000000..535cda4d80b --- /dev/null +++ b/src/test/run-make/dep-info/Makefile @@ -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 diff --git a/src/test/run-make/dep-info/Makefile.foo b/src/test/run-make/dep-info/Makefile.foo new file mode 100644 index 00000000000..3e009828c0c --- /dev/null +++ b/src/test/run-make/dep-info/Makefile.foo @@ -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 diff --git a/src/test/run-make/dep-info/bar.rs b/src/test/run-make/dep-info/bar.rs new file mode 100644 index 00000000000..c5c0bc606cd --- /dev/null +++ b/src/test/run-make/dep-info/bar.rs @@ -0,0 +1 @@ +pub fn bar() {} diff --git a/src/test/run-make/dep-info/foo.rs b/src/test/run-make/dep-info/foo.rs new file mode 100644 index 00000000000..b76b4321d62 --- /dev/null +++ b/src/test/run-make/dep-info/foo.rs @@ -0,0 +1 @@ +pub fn foo() {} diff --git a/src/test/run-make/dep-info/lib.rs b/src/test/run-make/dep-info/lib.rs new file mode 100644 index 00000000000..d08a0fbcb60 --- /dev/null +++ b/src/test/run-make/dep-info/lib.rs @@ -0,0 +1,4 @@ +#[pkgid="foo#0.1"]; + +pub mod foo; +pub mod bar;