Merged revisions 2898-2901,2903-2927 via svnmerge from
[scons.git] / test / Fortran / FORTRANMODDIR.py
index a81439abf8ba78aa9c647a49112848a87b2ec114..c0e158d79b6ebf67bfee9e39a6655260736f3970 100644 (file)
@@ -54,7 +54,10 @@ test.write('SConstruct', """
 env = Environment(FORTRANCOM = r'%(_python_)s myfortran.py $FORTRANMODDIR $SOURCE $TARGET',
                   FORTRANMODDIR = 'modules')
 env.Object(target = 'test1.obj', source = 'test1.f')
-env.Object(target = 'sub/test2.obj', source = 'test1.f',
+env.Object(target = 'sub2/test2.obj', source = 'test1.f',
+           FORTRANMODDIR='${TARGET.dir}')
+env.Object(target = 'sub3/test3.obj', source = 'test1.f',
+           FORTRANCOM = r'%(_python_)s myfortran.py $_FORTRANMODFLAG $SOURCE $TARGET',
            FORTRANMODDIR='${TARGET.dir}')
 """ % locals())
 
@@ -88,8 +91,11 @@ test.must_match('test1.obj', "myfortran.py wrote test1.obj\n")
 test.must_match(['modules', 'mod_foo.mod'], "myfortran.py wrote mod_foo.mod\n")
 test.must_not_exist(['modules', 'mod_bar.mod'])
 
-test.must_match(['sub', 'test2.obj'], "myfortran.py wrote test2.obj\n")
-test.must_match(['sub', 'mod_foo.mod'], "myfortran.py wrote mod_foo.mod\n")
+test.must_match(['sub2', 'test2.obj'], "myfortran.py wrote test2.obj\n")
+test.must_match(['sub2', 'mod_foo.mod'], "myfortran.py wrote mod_foo.mod\n")
+
+test.must_match(['sub3', 'test3.obj'], "myfortran.py wrote test3.obj\n")
+test.must_match(['sub3', 'mod_foo.mod'], "myfortran.py wrote mod_foo.mod\n")
 
 test.up_to_date(arguments = '.')