Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make --dep-info escape spaces in filenames
Closes #17627
- Loading branch information
Showing
6 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-include ../tools.mk | ||
|
||
# FIXME: ignore freebsd/windows | ||
# (windows: see `../dep-info/Makefile`) | ||
ifneq ($(shell uname),FreeBSD) | ||
ifndef IS_WINDOWS | ||
all: | ||
$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs | ||
sleep 1 | ||
touch '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 | ||
else | ||
all: | ||
|
||
endif | ||
|
||
else | ||
all: | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
LIB := $(shell $(RUSTC) --print-file-name --crate-type=lib lib.rs) | ||
|
||
$(TMPDIR)/$(LIB): | ||
$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs | ||
touch $(TMPDIR)/done | ||
|
||
-include $(TMPDIR)/custom-deps-file.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
pub fn bar() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
pub fn foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
#[path="foo foo.rs"] | ||
pub mod foo; | ||
|
||
pub mod bar; |
2883b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at jgallagher@2883b76
2883b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging jgallagher/rust/dep-info-escape-spaces = 2883b76 into auto
2883b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jgallagher/rust/dep-info-escape-spaces = 2883b76 merged ok, testing candidate = dd7f00d
2883b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/1624
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/1621
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/1615
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/1621
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/1618
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/1617
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/1617
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/1621
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/1615
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/1614
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1617
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/1272
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/1270
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/1274
success: http://buildbot.rust-lang.org/builders/auto-win-64-opt/builds/107
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-t/builds/105
success: http://buildbot.rust-lang.org/builders/auto-win-64-nopt-c/builds/105
2883b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = dd7f00d