Use --crate-file-name to find out the library filename in dep-info test

This commit is contained in:
Andreas Neuhaus 2013-12-22 21:37:33 +01:00
parent 9b1e7db71c
commit 5d0fea1441
2 changed files with 3 additions and 6 deletions

View File

@ -1,4 +1,5 @@
-include ../tools.mk
all:
$(RUSTC) --dep-info --lib lib.rs
sleep 1

View File

@ -1,10 +1,6 @@
ifeq ($(shell uname),Darwin)
LIBEXT=dylib
else
LIBEXT=so
endif
LIB := $(shell $(RUSTC) --crate-file-name --lib lib.rs)
$(TMPDIR)/libfoo-b517899a-0.1.$(LIBEXT):
$(TMPDIR)/$(LIB):
$(RUSTC) --dep-info --lib lib.rs
touch $(TMPDIR)/done