aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/coredata.py6
-rw-r--r--mesonbuild/environment.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index fba90fa..6e60917 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -211,8 +211,8 @@ class UserFeatureOption(UserComboOption):
return self.value == 'auto'
-def load_configs(filenames):
- """Load native files."""
+def load_configs(filenames, subdir):
+ """Load configuration files from a named subdirectory."""
def gen():
for f in filenames:
f = os.path.expanduser(os.path.expandvars(f))
@@ -225,7 +225,7 @@ def load_configs(filenames):
os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')),
] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':')
for path in paths:
- path_to_try = os.path.join(path, 'meson', 'native', f)
+ path_to_try = os.path.join(path, 'meson', subdir, f)
if os.path.isfile(path_to_try):
yield path_to_try
break
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 58adb06..92a00dd 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -408,7 +408,7 @@ class Environment:
if self.coredata.config_files is not None:
config = MesonConfigFile.from_config_parser(
- coredata.load_configs(self.coredata.config_files))
+ coredata.load_configs(self.coredata.config_files, 'native'))
self.binaries.build = BinaryTable(config.get('binaries', {}))
self.paths.build = Directories(**config.get('paths', {}))