From b044c7d46a734e8d35e4f651376e76f6f13f6b86 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Mon, 1 Dec 2003 13:22:33 +0000 Subject: Make the Fortran scanner case-insensitive. (David M. Cooke) --- src/CHANGES.txt | 4 ++++ src/engine/SCons/Scanner/Fortran.py | 2 +- src/engine/SCons/Scanner/FortranTests.py | 4 ++-- test/F77PATH.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 037b6f6..08e007a 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -20,6 +20,10 @@ RELEASE 0.95 - XXX - Accomodate the fact that Cygwin's os.path.normcase() lies about the underlying system being case-sensitive. + From David M. Cooke: + + - Make the Fortran scanner case-insensitive for the INCLUDE string. + From Charles Crain: - If no version of MSVC is detected but the tool is specified, diff --git a/src/engine/SCons/Scanner/Fortran.py b/src/engine/SCons/Scanner/Fortran.py index 2e44eb9..473375c 100644 --- a/src/engine/SCons/Scanner/Fortran.py +++ b/src/engine/SCons/Scanner/Fortran.py @@ -44,6 +44,6 @@ def FortranScan(fs = SCons.Node.FS.default_fs): scanner = SCons.Scanner.Classic("FortranScan", [".f", ".F", ".for", ".FOR"], "F77PATH", - "INCLUDE[ \t]+'([\\w./\\\\]+)'", + "(?i)INCLUDE[ \t]+'([\\w./\\\\]+)'", fs = fs) return scanner diff --git a/src/engine/SCons/Scanner/FortranTests.py b/src/engine/SCons/Scanner/FortranTests.py index 7564c1e..a719765 100644 --- a/src/engine/SCons/Scanner/FortranTests.py +++ b/src/engine/SCons/Scanner/FortranTests.py @@ -45,7 +45,7 @@ os.chdir(test.workpath('')) test.write('fff1.f',""" PROGRAM FOO INCLUDE 'f1.f' - INCLUDE 'f2.f' + include 'f2.f' STOP END """) @@ -53,7 +53,7 @@ test.write('fff1.f',""" test.write('fff2.f',""" PROGRAM FOO INCLUDE 'f2.f' - INCLUDE 'd1/f2.f' + include 'd1/f2.f' INCLUDE 'd2/f2.f' STOP END diff --git a/test/F77PATH.py b/test/F77PATH.py index af3a9c9..340c321 100644 --- a/test/F77PATH.py +++ b/test/F77PATH.py @@ -77,7 +77,7 @@ test.write(['subdir', 'prog.f'], r""" PROGRAM PROG PRINT *, 'subdir/prog.f' - INCLUDE 'foo.f' + include 'foo.f' STOP END """) -- cgit v0.12