diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-06-23 09:40:27 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-23 17:27:46 +0300 |
commit | ef53107f14a272784e3fa2b0daa67cbba6f5ac56 (patch) | |
tree | cb455b2358b6eb2b8bfa571deed3130befbd58fe /mesonbuild/backend | |
parent | 9042130e9a990497c0e53a43d2750fb907507f09 (diff) | |
download | meson-ef53107f14a272784e3fa2b0daa67cbba6f5ac56.zip meson-ef53107f14a272784e3fa2b0daa67cbba6f5ac56.tar.gz meson-ef53107f14a272784e3fa2b0daa67cbba6f5ac56.tar.bz2 |
BUGFIX: Fortran module regex handle more edge cases
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 1e132b5..54535ff 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -38,10 +38,10 @@ from ..mesonlib import get_compiler_for_source, has_path_sep from .backends import CleanTrees from ..build import InvalidArguments -FORTRAN_INCLUDE_PAT = r"#?include\s*['\"](\w+\.\w+)['\"]" -FORTRAN_MODULE_PAT = r"\s*\bmodule\b\s+(?!procedure)(\w+)" -FORTRAN_SUBMOD_PAT = r"\s*submodule\s*\((\w+:?\w+)\)\s*(\w+)" -FORTRAN_USE_PAT = r"\s*use,?\s*(?:non_intrinsic)?\s*(?:::)?\s*(\w+)" +FORTRAN_INCLUDE_PAT = r"^\s*#?include\s*['\"](\w+\.\w+)['\"]" +FORTRAN_MODULE_PAT = r"^\s*\bmodule\b\s+(\w+)\s*(?:!+.*)*$" +FORTRAN_SUBMOD_PAT = r"^\s*\bsubmodule\b\s*\((\w+:?\w+)\)\s*(\w+)" +FORTRAN_USE_PAT = r"^\s*use,?\s*(?:non_intrinsic)?\s*(?:::)?\s*(\w+)" if mesonlib.is_windows(): quote_func = lambda s: '"{}"'.format(s) |