Update to Scintilla 5.2.0
[TortoiseGit.git] / ext / scintilla / win32 / DepGen.py
blobd53cbe21778652c0218efe98baa89bfe1f65ffd4
1 #!/usr/bin/env python3
2 # DepGen.py - produce a make dependencies file for Scintilla
3 # Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
4 # The License.txt file describes the conditions under which this software may be distributed.
5 # Requires Python 3.6 or later
7 import sys
9 sys.path.append("..")
11 from scripts import Dependencies
13 topComment = "# Created by DepGen.py. To recreate, run DepGen.py.\n"
15 def Generate():
16 sources = ["../src/*.cxx"]
17 includes = ["../include", "../src"]
19 # Create the dependencies file for g++
20 deps = Dependencies.FindDependencies(["../win32/*.cxx"] + sources, ["../win32"] + includes, ".o", "../win32/")
22 # Place the objects in $(DIR_O)
23 deps = [["$(DIR_O)/"+obj, headers] for obj, headers in deps]
25 Dependencies.UpdateDependencies("../win32/deps.mak", deps, topComment)
27 # Create the dependencies file for MSVC
29 # Place the objects in $(DIR_O) and change extension from ".o" to ".obj"
30 deps = [["$(DIR_O)/"+Dependencies.PathStem(obj)+".obj", headers] for obj, headers in deps]
32 Dependencies.UpdateDependencies("../win32/nmdeps.mak", deps, topComment)
34 if __name__ == "__main__":
35 Generate()