Merged revisions 2136-2200,2202-2290,2292-2301 via svnmerge from
[scons.git] / test / Fortran / FORTRANMODDIR.py
index f0c500ccad5b7ca77bd5c2d8aa6395ef947125c1..a81439abf8ba78aa9c647a49112848a87b2ec114 100644 (file)
@@ -54,6 +54,8 @@ 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',
+           FORTRANMODDIR='${TARGET.dir}')
 """ % locals())
 
 test.write('test1.f', """\
@@ -86,6 +88,9 @@ 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.up_to_date(arguments = '.')