@@ -2918,22 +2918,16 @@ target file's directory.</para>
29182918<programlisting language =" python" >
29192919# scons will change to the "sub" subdirectory
29202920# before executing the "cp" command.
2921- env.Command(
2922- target='sub/dir/foo.out',
2923- source='sub/dir/foo.in',
2924- action="cp dir/foo.in dir/foo.out",
2925- chdir='sub',
2926- )
2921+ env.Command('sub/dir/foo.out', 'sub/dir/foo.in',
2922+ "cp dir/foo.in dir/foo.out",
2923+ chdir='sub')
29272924
29282925# Because chdir is not a string, scons will change to the
29292926# target's directory ("sub/dir") before executing the
29302927# "cp" command.
2931- env.Command(
2932- target='sub/dir/foo.out',
2933- source='sub/dir/foo.in',
2934- action="cp foo.in foo.out",
2935- chdir=True,
2936- )
2928+ env.Command('sub/dir/foo.out', 'sub/dir/foo.in',
2929+ "cp foo.in foo.out",
2930+ chdir=1)
29372931</programlisting >
29382932
29392933<para >Note that &SCons; will
@@ -6519,8 +6513,9 @@ and the result substituted in.
65196513So in the following case:</para >
65206514
65216515<programlisting language =" python" >
6522- env.Command('foo.out', 'foo.in',
6523- '''echo ${COND==1 and 'FOO' or 'BAR'} > $TARGET''')
6516+ env.Command(
6517+ 'foo.out', 'foo.in', "echo ${COND==1 and 'FOO' or 'BAR'} > $TARGET"
6518+ )
65246519</programlisting >
65256520
65266521<para >the command executed will be either</para >
@@ -6556,8 +6551,9 @@ env=Environment()
65566551env['COND'] = 1
65576552env['FOO'] = ['foo1', 'foo2']
65586553env['BAR'] = 'barbar'
6559- env.Command('foo.out', 'foo.in',
6560- 'echo ${COND==1 and FOO or BAR} > $TARGET')
6554+ env.Command(
6555+ 'foo.out', 'foo.in', "echo ${COND==1 and FOO or BAR} > $TARGET"
6556+ )
65616557</programlisting >
65626558
65636559<para >will execute:</para >
0 commit comments