aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-06-02 15:00:01 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2022-06-08 23:19:09 +0300
commitd0a0e04c987ea92473073f9c3017fe648fc59f04 (patch)
tree66d8f500346d245e8270f3ea1ae8974dc21dbfcb /mesonbuild/backend/vs2010backend.py
parent3efb51a958d81e40fb3e29481fc4c1887daefb7f (diff)
downloadmeson-d0a0e04c987ea92473073f9c3017fe648fc59f04.zip
meson-d0a0e04c987ea92473073f9c3017fe648fc59f04.tar.gz
meson-d0a0e04c987ea92473073f9c3017fe648fc59f04.tar.bz2
build: Store depends in GeneratedList instead of Generator
Since they are actually dependencies out the output not the Generator itself. This fixes dependency issues in the ninja backend, allowing Meson to rebuild more accurately. It also does sometimes in the vs backend, but there are problems in the vs backend I'm not sure how to solve. The vsbackend is, itself, so fragile looking I don't want to get too involved with it.
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r--mesonbuild/backend/vs2010backend.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 6a182d9..9d3f6c5 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import annotations
import copy
+import itertools
import os
import xml.dom.minidom
import xml.etree.ElementTree as ET
@@ -318,11 +320,13 @@ class Vs2010Backend(backends.Backend):
gen_exe = generator.get_exe()
if isinstance(gen_exe, build.Executable):
all_deps[gen_exe.get_id()] = gen_exe
- for d in generator.depends:
+ for d in itertools.chain(generator.depends, gendep.depends):
if isinstance(d, build.CustomTargetIndex):
all_deps[d.get_id()] = d.target
- else:
+ elif isinstance(d, build.Target):
all_deps[d.get_id()] = d
+ # FIXME: we don't handle other kinds of deps correctly here, such
+ # as GeneratedLists, StructuredSources, and generated File.
if not t or not recursive:
return all_deps