summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/dep-info/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /tests/run-make-fulldeps/dep-info/Makefile
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/dep-info/Makefile')
-rw-r--r--tests/run-make-fulldeps/dep-info/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/run-make-fulldeps/dep-info/Makefile b/tests/run-make-fulldeps/dep-info/Makefile
new file mode 100644
index 000000000..c76f43a8e
--- /dev/null
+++ b/tests/run-make-fulldeps/dep-info/Makefile
@@ -0,0 +1,25 @@
+include ../tools.mk
+
+# ignore-windows
+# ignore-freebsd
+# FIXME: on windows `rustc --dep-info` produces Makefile dependency with
+# windows native paths (e.g. `c:\path\to\libfoo.a`)
+# but msys make seems to fail to recognize such paths, so test fails.
+
+all:
+ cp *.rs $(TMPDIR)
+ $(RUSTC) --emit dep-info,link --crate-type=lib $(TMPDIR)/lib.rs
+ sleep 2
+ touch $(TMPDIR)/foo.rs
+ -rm -f $(TMPDIR)/done
+ $(MAKE) -drf Makefile.foo
+ sleep 2
+ rm $(TMPDIR)/done
+ pwd
+ $(MAKE) -drf Makefile.foo
+ 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