2022-08-23 00:00:00 +00:00
|
|
|
include ../tools.mk
|
2013-12-22 21:37:33 +01:00
|
|
|
|
2019-01-06 16:27:57 -05:00
|
|
|
# ignore-windows
|
|
|
|
# ignore-freebsd
|
|
|
|
# FIXME: on windows `rustc --dep-info` produces Makefile dependency with
|
2014-04-27 16:52:36 +09:00
|
|
|
# windows native paths (e.g. `c:\path\to\libfoo.a`)
|
|
|
|
# but msys make seems to fail to recognize such paths, so test fails.
|
2019-01-06 16:27:57 -05:00
|
|
|
|
2013-12-11 13:08:23 -07:00
|
|
|
all:
|
2015-09-30 10:17:07 -07:00
|
|
|
cp *.rs $(TMPDIR)
|
|
|
|
$(RUSTC) --emit dep-info,link --crate-type=lib $(TMPDIR)/lib.rs
|
2014-04-03 13:12:19 -07:00
|
|
|
sleep 2
|
2015-09-30 10:17:07 -07:00
|
|
|
touch $(TMPDIR)/foo.rs
|
2013-12-11 13:08:23 -07:00
|
|
|
-rm -f $(TMPDIR)/done
|
2013-12-22 21:38:55 +01:00
|
|
|
$(MAKE) -drf Makefile.foo
|
2014-04-03 13:12:19 -07:00
|
|
|
sleep 2
|
2013-12-11 13:08:23 -07:00
|
|
|
rm $(TMPDIR)/done
|
|
|
|
pwd
|
2013-12-22 21:38:55 +01:00
|
|
|
$(MAKE) -drf Makefile.foo
|
2013-12-11 13:08:23 -07:00
|
|
|
rm $(TMPDIR)/done && exit 1 || exit 0
|
2015-09-30 10:17:07 -07:00
|
|
|
|
|
|
|
# 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
|