aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-04-08 16:43:33 +1000
committerNeil <nyamatongwe@gmail.com>2019-04-08 16:43:33 +1000
commit568f40a9251eee0f17d80dadff5970d78744ee95 (patch)
treea608dc6adb715d0c2ed441bb6f9e46438b16d0b2
parent59d31a1f02c84747f402809e1c93378a0bb3fa5f (diff)
downloadscintilla-mirror-568f40a9251eee0f17d80dadff5970d78744ee95.tar.gz
Backport: Use native line ends for make dependencies files.
Backport of changeset 7412:c8b567af58c0.
-rw-r--r--scripts/Dependencies.py7
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. """