Skip to content

Commit bcad36f

Browse files
committed
[PR #3811] revert some Command syntax changes [ci skip]
Signed-off-by: Mats Wichmann <[email protected]>
1 parent 1898eb0 commit bcad36f

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

doc/man/scons.xml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
65196513
So 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'} &gt; $TARGET''')
6516+
env.Command(
6517+
'foo.out', 'foo.in', "echo ${COND==1 and 'FOO' or 'BAR'} &gt; $TARGET"
6518+
)
65246519
</programlisting>
65256520

65266521
<para>the command executed will be either</para>
@@ -6556,8 +6551,9 @@ env=Environment()
65566551
env['COND'] = 1
65576552
env['FOO'] = ['foo1', 'foo2']
65586553
env['BAR'] = 'barbar'
6559-
env.Command('foo.out', 'foo.in',
6560-
'echo ${COND==1 and FOO or BAR} &gt; $TARGET')
6554+
env.Command(
6555+
'foo.out', 'foo.in', "echo ${COND==1 and FOO or BAR} &gt; $TARGET"
6556+
)
65616557
</programlisting>
65626558

65636559
<para>will execute:</para>

0 commit comments

Comments
 (0)