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
11 from scripts
import Dependencies
13 topComment
= "# Created by DepGen.py. To recreate, run DepGen.py.\n"
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__":