summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/dep-info-spaces
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /tests/run-make-fulldeps/dep-info-spaces
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-make-fulldeps/dep-info-spaces')
-rw-r--r--tests/run-make-fulldeps/dep-info-spaces/Makefile19
-rw-r--r--tests/run-make-fulldeps/dep-info-spaces/Makefile.foo7
-rw-r--r--tests/run-make-fulldeps/dep-info-spaces/bar.rs1
-rw-r--r--tests/run-make-fulldeps/dep-info-spaces/foo foo.rs1
-rw-r--r--tests/run-make-fulldeps/dep-info-spaces/lib.rs4
5 files changed, 32 insertions, 0 deletions
diff --git a/tests/run-make-fulldeps/dep-info-spaces/Makefile b/tests/run-make-fulldeps/dep-info-spaces/Makefile
new file mode 100644
index 000000000..0cfe513e4
--- /dev/null
+++ b/tests/run-make-fulldeps/dep-info-spaces/Makefile
@@ -0,0 +1,19 @@
+include ../tools.mk
+
+# ignore-windows
+# ignore-freebsd
+# FIXME: (windows: see `../dep-info/Makefile`)
+
+all:
+ cp lib.rs $(TMPDIR)/
+ cp 'foo foo.rs' $(TMPDIR)/
+ cp bar.rs $(TMPDIR)/
+ $(RUSTC) --emit link,dep-info --crate-type=lib $(TMPDIR)/lib.rs
+ sleep 1
+ touch $(TMPDIR)/'foo foo.rs'
+ -rm -f $(TMPDIR)/done
+ $(MAKE) -drf Makefile.foo
+ rm $(TMPDIR)/done
+ pwd
+ $(MAKE) -drf Makefile.foo
+ rm $(TMPDIR)/done && exit 1 || exit 0
diff --git a/tests/run-make-fulldeps/dep-info-spaces/Makefile.foo b/tests/run-make-fulldeps/dep-info-spaces/Makefile.foo
new file mode 100644
index 000000000..80a5d4333
--- /dev/null
+++ b/tests/run-make-fulldeps/dep-info-spaces/Makefile.foo
@@ -0,0 +1,7 @@
+LIB := $(shell $(RUSTC) --print file-names --crate-type=lib $(TMPDIR)/lib.rs)
+
+$(TMPDIR)/$(LIB):
+ $(RUSTC) --emit link,dep-info --crate-type=lib $(TMPDIR)/lib.rs
+ touch $(TMPDIR)/done
+
+-include $(TMPDIR)/lib.d
diff --git a/tests/run-make-fulldeps/dep-info-spaces/bar.rs b/tests/run-make-fulldeps/dep-info-spaces/bar.rs
new file mode 100644
index 000000000..c5c0bc606
--- /dev/null
+++ b/tests/run-make-fulldeps/dep-info-spaces/bar.rs
@@ -0,0 +1 @@
+pub fn bar() {}
diff --git a/tests/run-make-fulldeps/dep-info-spaces/foo foo.rs b/tests/run-make-fulldeps/dep-info-spaces/foo foo.rs
new file mode 100644
index 000000000..b76b4321d
--- /dev/null
+++ b/tests/run-make-fulldeps/dep-info-spaces/foo foo.rs
@@ -0,0 +1 @@
+pub fn foo() {}
diff --git a/tests/run-make-fulldeps/dep-info-spaces/lib.rs b/tests/run-make-fulldeps/dep-info-spaces/lib.rs
new file mode 100644
index 000000000..6264e7b67
--- /dev/null
+++ b/tests/run-make-fulldeps/dep-info-spaces/lib.rs
@@ -0,0 +1,4 @@
+#[path="foo foo.rs"]
+pub mod foo;
+
+pub mod bar;