mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Add test for --dep-info.
This commit is contained in:
parent
9365375c7f
commit
b2ccd4c3ec
11
src/test/run-make/dep-info/Makefile
Normal file
11
src/test/run-make/dep-info/Makefile
Normal 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
|
11
src/test/run-make/dep-info/Makefile.foo
Normal file
11
src/test/run-make/dep-info/Makefile.foo
Normal 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
|
1
src/test/run-make/dep-info/bar.rs
Normal file
1
src/test/run-make/dep-info/bar.rs
Normal file
@ -0,0 +1 @@
|
||||
pub fn bar() {}
|
1
src/test/run-make/dep-info/foo.rs
Normal file
1
src/test/run-make/dep-info/foo.rs
Normal file
@ -0,0 +1 @@
|
||||
pub fn foo() {}
|
4
src/test/run-make/dep-info/lib.rs
Normal file
4
src/test/run-make/dep-info/lib.rs
Normal file
@ -0,0 +1,4 @@
|
||||
#[pkgid="foo#0.1"];
|
||||
|
||||
pub mod foo;
|
||||
pub mod bar;
|
Loading…
Reference in New Issue
Block a user