Fix handling file names with multiple dots. (Charles Crain)
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 21 Jun 2002 18:19:45 +0000 (18:19 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 21 Jun 2002 18:19:45 +0000 (18:19 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@395 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/CHANGES.txt
src/engine/SCons/Builder.py
src/engine/SCons/BuilderTests.py

index ad9f56c04b1bd1e4160564218a20a10a51fe6670..5f87eb91aa8377a2aada4a55064697dd4e5cf85e 100644 (file)
@@ -38,6 +38,8 @@ RELEASE 0.08 -
   - Removed support for the prefix, suffix and src_suffix arguments
     to Builder() to be callable functions.
 
+  - Fix handling file names with multiple dots.
+
   From Charles Crain and Steven Knight:
 
   - Add a "tools=" keyword argument to Environment instantiation,
index 4dd6163504af31bf441416e0530d61cb96d20d62..0b54303b459cf7c5458432e834d33c0b9ff45d97 100644 (file)
@@ -456,7 +456,7 @@ class MultiStepBuilder(BuilderBase):
                 src_bld = sdict[ext]
 
                 dictArgs = copy.copy(kw)
-                dictArgs['target'] = [path]
+                dictArgs['target'] = [ path + src_bld.get_suffix(env) ]
                 dictArgs['source'] = snode
                 dictArgs['env'] = env
                 tgt = apply(src_bld, (), dictArgs)
index 7ff06c2a71501b24687252b8b5903ab96d84169d..c0ed108e83eb56a387562e5d51b7e6703a5cc099 100644 (file)
@@ -578,9 +578,9 @@ class BuilderTestCase(unittest.TestCase):
                                                   action='bar',
                                                   src_builder = builder1,
                                                   src_suffix = '.foo')
-        tgt = builder2(env, target='baz', source=['test.bar', 'test2.foo', 'test3.txt'])
-        assert str(tgt.sources[0]) == 'test.foo', str(tgt.sources[0])
-        assert str(tgt.sources[0].sources[0]) == 'test.bar', \
+        tgt = builder2(env, target='baz', source=['test.bleh.bar', 'test2.foo', 'test3.txt'])
+        assert str(tgt.sources[0]) == 'test.bleh.foo', str(tgt.sources[0])
+        assert str(tgt.sources[0].sources[0]) == 'test.bleh.bar', \
                str(tgt.sources[0].sources[0])
         assert str(tgt.sources[1]) == 'test2.foo', str(tgt.sources[1])
         assert str(tgt.sources[2]) == 'test3.txt', str(tgt.sources[2])
@@ -654,7 +654,7 @@ class BuilderTestCase(unittest.TestCase):
         assert isinstance(tgt.builder, SCons.Builder.MultiStepBuilder)
 
         flag = 0
-        tgt = builder(env, target='t5', source='test5a.foo test5b.inb')
+        tgt = builder(env, target='t5', source=[ 'test5a.foo',  'test5b.inb' ])
         try:
             tgt.build()
         except SCons.Errors.UserError:
@@ -662,7 +662,7 @@ class BuilderTestCase(unittest.TestCase):
         assert flag, "UserError should be thrown when we build targets with files of different suffixes."
 
         flag = 0
-        tgt = builder(env, target='t6', source='test6a.bar test6b.ina')
+        tgt = builder(env, target='t6', source=[ 'test6a.bar',  'test6b.ina' ])
         try:
             tgt.build()
         except SCons.Errors.UserError:
@@ -670,7 +670,7 @@ class BuilderTestCase(unittest.TestCase):
         assert flag, "UserError should be thrown when we build targets with files of different suffixes."
 
         flag = 0
-        tgt = builder(env, target='t4', source='test4a.ina test4b.inb')
+        tgt = builder(env, target='t4', source=[ 'test4a.ina',  'test4b.inb' ])
         try:
             tgt.build()
         except SCons.Errors.UserError: