rust/tests/run-make/dep-info/Makefile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
668 B
Makefile
Raw Normal View History

include ../tools.mk
# ignore-windows
# ignore-freebsd
# FIXME: on windows `rustc --dep-info` produces Makefile dependency with
2014-04-27 15:52:36 +08:00
# windows native paths (e.g. `c:\path\to\libfoo.a`)
# but msys make seems to fail to recognize such paths, so test fails.
2013-12-12 04:08:23 +08:00
all:
cp *.rs $(TMPDIR)
$(RUSTC) --emit dep-info,link --crate-type=lib $(TMPDIR)/lib.rs
2014-04-04 04:12:19 +08:00
sleep 2
touch $(TMPDIR)/foo.rs
2013-12-12 04:08:23 +08:00
-rm -f $(TMPDIR)/done
$(MAKE) -drf Makefile.foo
2014-04-04 04:12:19 +08:00
sleep 2
2013-12-12 04:08:23 +08:00
rm $(TMPDIR)/done
pwd
$(MAKE) -drf Makefile.foo
2013-12-12 04:08:23 +08:00
rm $(TMPDIR)/done && exit 1 || exit 0
# When a source file is deleted `make` should still work
rm $(TMPDIR)/bar.rs
cp $(TMPDIR)/lib2.rs $(TMPDIR)/lib.rs
$(MAKE) -drf Makefile.foo