Add ParseConfig() support for -mwindows and -mno-cygwin. (Clive Levinson)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 24 Sep 2004 19:33:09 +0000 (19:33 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 24 Sep 2004 19:33:09 +0000 (19:33 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1100 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Environment.py
src/engine/SCons/EnvironmentTests.py

index 4780aedbabaff2584a553fd9bfcfcc37f61d3672..1008e8ee88e85c25b6920d935688414b81736e45 100644 (file)
@@ -69,6 +69,11 @@ RELEASE 0.97 - XXX
   - Allow a ListOption's default value(s) to be a Python list of specified
     values, not just a string containing a comma-separated list of names.
 
+  From Clive Levinson:
+
+  - Make ParseConfig() recognize and add -mno-cygwin to $LINKFLAGS and
+    $CCFLAGS, and -mwindows to $LINKFLAGS.
+
   From Elliot Murphy:
 
   - Enhance the tests to guarantee persistence of ListOption
index ba63032c875fa4f288d92d7d18ebef0d81e93420..df2a93a61f456836a716eb87d8ade4a129a30b81 100644 (file)
@@ -773,6 +773,11 @@ class Base:
                 elif arg == '-framework':
                     dict['LINKFLAGS'].append(arg)
                     append_next_arg_to='LINKFLAGS'
+                elif arg == '-mno-cygwin':
+                    dict['CCFLAGS'].append(arg)
+                    dict['LINKFLAGS'].append(arg)
+                elif arg == '-mwindows':
+                    dict['LINKFLAGS'].append(arg)
                 elif arg == '-pthread':
                     dict['CCFLAGS'].append(arg)
                     dict['LINKFLAGS'].append(arg)
index 4839e2ad064c571601a4c0f42c7ddd35a7a2e7c9..7023fea5321cc807d84ec45123907acbc6162cb6 100644 (file)
@@ -1335,7 +1335,9 @@ class EnvironmentTestCase(unittest.TestCase):
                 def read(self):
                     return "-I/usr/include/fum -Ibar -X\n" + \
                            "-L/usr/fax -Lfoo -lxxx " + \
-                           "-Wa,-as -Wl,-link -Wp,-cpp abc -pthread -framework Carbon"
+                           "-Wa,-as -Wl,-link -Wp,-cpp abc " + \
+                           "-pthread -framework Carbon " + \
+                           "-mno-cygwin -mwindows"
             return fake_file()
         try:
             os.popen = my_popen
@@ -1346,8 +1348,8 @@ class EnvironmentTestCase(unittest.TestCase):
             assert env['CPPFLAGS'] == ['', '-Wp,-cpp'], env['CPPFLAGS']
             assert env['LIBPATH'] == ['list', '/usr/fax', 'foo'], env['LIBPATH']
             assert env['LIBS'] == ['xxx', env.File('abc')], env['LIBS']
-            assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread', '-framework', 'Carbon'], env['LINKFLAGS']
-            assert env['CCFLAGS'] == ['', '-X', '-pthread'], env['CCFLAGS']
+            assert env['LINKFLAGS'] == ['', '-Wl,-link', '-pthread', '-framework', 'Carbon', '-mno-cygwin', '-mwindows'], env['LINKFLAGS']
+            assert env['CCFLAGS'] == ['', '-X', '-pthread', '-mno-cygwin'], env['CCFLAGS']
         finally:
             os.popen = orig_popen