diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-08 16:43:33 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-08 16:43:33 +1000 |
commit | 568f40a9251eee0f17d80dadff5970d78744ee95 (patch) | |
tree | a608dc6adb715d0c2ed441bb6f9e46438b16d0b2 | |
parent | 59d31a1f02c84747f402809e1c93378a0bb3fa5f (diff) | |
download | scintilla-mirror-568f40a9251eee0f17d80dadff5970d78744ee95.tar.gz |
Backport: Use native line ends for make dependencies files.
Backport of changeset 7412:c8b567af58c0.
-rw-r--r-- | scripts/Dependencies.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Dependencies.py b/scripts/Dependencies.py index 86a2d3b22..90b8b9529 100644 --- a/scripts/Dependencies.py +++ b/scripts/Dependencies.py @@ -123,7 +123,7 @@ def TextFromDependencies(dependencies): """ Convert a list of dependencies to text. """ text = "" indentHeaders = "\t" - joinHeaders = continuationLineEnd + "\n" + indentHeaders + joinHeaders = continuationLineEnd + os.linesep + indentHeaders for dep in dependencies: object, headers = dep text += object + ":" @@ -131,12 +131,13 @@ def TextFromDependencies(dependencies): text += joinHeaders text += header if headers: - text += "\n" + text += os.linesep return text def UpdateDependencies(filepath, dependencies, comment=""): """ Write a dependencies file if different from dependencies. """ - FileGenerator.UpdateFile(filepath, comment+TextFromDependencies(dependencies)) + FileGenerator.UpdateFile(os.path.abspath(filepath), comment.rstrip() + os.linesep + + TextFromDependencies(dependencies)) def WriteDependencies(output, dependencies): """ Write a list of dependencies out to a stream. """ |