diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-18 21:25:46 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-18 21:55:20 +0300 |
commit | 4962ca1c7e1215a22c888035d88a2e1d65919175 (patch) | |
tree | ad48e5805cf5359659c59f1842f0f6f5089915ea /mesonbuild/backend/backends.py | |
parent | aaa8a828cb2b50394457894d70952d92f0fe76bd (diff) | |
download | meson-xcodehalfway.tar.gz |
Xcode: regenerato project file when build conf changes.xcodehalfway
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 90d7b79d0..04f3d23cf 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -49,6 +49,12 @@ if T.TYPE_CHECKING: # Assembly files cannot be unitified and neither can LLVM IR files LANGS_CANT_UNITY = ('d', 'fortran', 'vala') +class RegenInfo: + def __init__(self, source_dir, build_dir, depfiles): + self.source_dir = source_dir + self.build_dir = build_dir + self.depfiles = depfiles + class TestProtocol(enum.Enum): EXITCODE = 0 @@ -1007,6 +1013,16 @@ class Backend: self.check_clock_skew(deps) return deps + def generate_regen_info(self): + deps = self.get_regen_filelist() + regeninfo = RegenInfo(self.environment.get_source_dir(), + self.environment.get_build_dir(), + deps) + filename = os.path.join(self.environment.get_scratch_dir(), + 'regeninfo.dump') + with open(filename, 'wb') as f: + pickle.dump(regeninfo, f) + def check_clock_skew(self, file_list): # If a file that leads to reconfiguration has a time # stamp in the future, it will trigger an eternal reconfigure |