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
commit92115d15f3bb44499e5fc61de7178d8aff965d56 (patch)
tree14c86163b6bdb000ea583053f9b4ea3e6fafe90c
parentd04015772a80af227ae05d47c112933e152aec48 (diff)
downloadscintilla-mirror-92115d15f3bb44499e5fc61de7178d8aff965d56.tar.gz
Use native line ends for make dependencies files.
-rw-r--r--scripts/Dependencies.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Dependencies.py b/scripts/Dependencies.py
index a30295a58..db705137c 100644
--- a/scripts/Dependencies.py
+++ b/scripts/Dependencies.py
@@ -126,7 +126,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 + ":"
@@ -134,12 +134,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. """