diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 4 | ||||
-rw-r--r-- | mesonbuild/compilers.py | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 8de9b5a..e1a478c 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1758,9 +1758,9 @@ rule FORTRAN_DEP_HACK Compiles C/C++, ObjC/ObjC++, Fortran, and D sources """ if isinstance(src, str) and src.endswith('.h'): - raise AssertionError('BUG: sources should not contain headers') + raise AssertionError('BUG: sources should not contain headers {!r}'.format(src)) if isinstance(src, RawFilename) and src.fname.endswith('.h'): - raise AssertionError('BUG: sources should not contain headers') + raise AssertionError('BUG: sources should not contain headers {!r}'.format(src.fname)) extra_orderdeps = [] compiler = get_compiler_for_source(target.compilers.values(), src) commands = [] diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 22ee003..4178f0b 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -53,9 +53,10 @@ clike_langs = ('objcpp', 'objc', 'd', 'cpp', 'c', 'fortran',) clike_suffixes = () for l in clike_langs: clike_suffixes += lang_suffixes[l] -clike_suffixes += ('h',) +clike_suffixes += ('h', 'll', 's') + +# All these are only for C-like languages; see `clike_langs` above. -# These are used in backend/backends.py:generated_target() def is_header(fname): if hasattr(fname, 'fname'): fname = fname.fname @@ -65,7 +66,7 @@ def is_header(fname): def is_source(fname): if hasattr(fname, 'fname'): fname = fname.fname - suffix = fname.split('.')[-1] + suffix = fname.split('.')[-1].lower() return suffix in clike_suffixes def is_assembly(fname): |