Skip to content

Parse escaped spaces in makefile dependencies #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2014

Conversation

alexcrichton
Copy link
Member

This means that if a project has a file with a space in the name it will
properly have its freshness calculated as opposed to always having it as a
candidate to be rebuilt.

Closes #648

This means that if a project has a file with a space in the name it will
properly have its freshness calculated as opposed to always having it as a
candidate to be rebuilt.

Closes rust-lang#648
Some(s) => s.to_string(),
None => break,
};
while file.as_slice().ends_with("\\") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about foo\\ bar? (I.e. theoretically that's two deps foo\ and bar.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it looks like a backslash doesn't need escaping in makefiles:

$ touch foo\\.c
$ gcc foo\\.c -MMD
$ cat foo\\.d
foo\.o: foo\.c

I do think that this conversion is a little lossy, but I also think that it correctly parses any rustc-generated dependency file.

bors added a commit that referenced this pull request Oct 6, 2014
This means that if a project has a file with a space in the name it will
properly have its freshness calculated as opposed to always having it as a
candidate to be rebuilt.

Closes #648
@bors bors merged commit 3efe070 into rust-lang:master Oct 6, 2014
@alexcrichton alexcrichton deleted the issue-648 branch October 7, 2014 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File names with spaces causes the project to be recompiled every time
4 participants