diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index a354d6e1e..d2176c74f 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -125,6 +125,9 @@ class Backend(): outfileabs = os.path.join(self.environment.get_build_dir(), outfilename) outfileabs_tmp = outfileabs + '.tmp' abs_files.append(outfileabs) + outfileabs_tmp_dir = os.path.dirname(outfileabs_tmp) + if not os.path.exists(outfileabs_tmp_dir): + os.makedirs(outfileabs_tmp_dir) outfile = open(outfileabs_tmp, 'w') langlist[language] = outfile result.append(outfilename)