From 140d836e9cd54fb67b969fd82ef7ed19ba574d40 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 26 Apr 2014 15:11:58 +0200 Subject: Imported Upstream version 2.3.1 --- doc/user/sideeffect.xml | 117 +++++++++++++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 45 deletions(-) (limited to 'doc/user/sideeffect.xml') diff --git a/doc/user/sideeffect.xml b/doc/user/sideeffect.xml index a656f9d..72af9cc 100644 --- a/doc/user/sideeffect.xml +++ b/doc/user/sideeffect.xml @@ -1,6 +1,27 @@ + + + %scons; + + + %builders-mod; + + %functions-mod; + + %tools-mod; + + %variables-mod; +]> + + +Sideeffect files + - - Sometimes a program the you need to call @@ -95,12 +114,12 @@ - env = Environment() - env.Command('file1.out', 'file.in', - './build --log logfile.txt $SOURCE $TARGET') - env.Command('file2.out', 'file.in', - './build --log logfile.txt $SOURCE $TARGET') - +env = Environment() +env.Command('file1.out', 'file.in', + './build --log logfile.txt $SOURCE $TARGET') +env.Command('file2.out', 'file.in', + './build --log logfile.txt $SOURCE $TARGET') + @@ -134,14 +153,21 @@ - - env = Environment() - f1 = env.Command('file1.out', 'file1.in', - './build --log logfile.txt $SOURCE $TARGET') - f2 = env.Command('file2.out', 'file2.in', - './build --log logfile.txt $SOURCE $TARGET') - env.SideEffect('logfile.txt', f1 + f2) - + + +env = Environment() +f1 = env.Command('file1.out', 'file1.in', + './build --log logfile.txt $SOURCE $TARGET') +f2 = env.Command('file2.out', 'file2.in', + './build --log logfile.txt $SOURCE $TARGET') +env.SideEffect('logfile.txt', f1 + f2) + + file1.in + file2.in + +cat + + @@ -155,11 +181,9 @@ - - % scons -Q --jobs=2 - ./build --log logfile.txt file1.in file1.out - ./build --log logfile.txt file2.in file2.out - + + scons -Q --jobs=2 + @@ -173,19 +197,19 @@ - - env = Environment() - f1 = env.Command('file1.out', [], 'echo >$TARGET data1') - env.SideEffect('not_really_updated', f1) - f2 = env.Command('file2.out', [], 'echo >$TARGET data2') - env.SideEffect('not_really_updated', f2) - + + +env = Environment() +f1 = env.Command('file1.out', [], 'echo >$TARGET data1') +env.SideEffect('not_really_updated', f1) +f2 = env.Command('file2.out', [], 'echo >$TARGET data2') +env.SideEffect('not_really_updated', f2) + + - - % scons -Q --jobs=2 - echo > file1.out data1 - echo > file2.out data2 - + + scons -Q --jobs=2 + @@ -209,3 +233,6 @@ may actually updated by more than one command invocation. + + + -- cgit v1.2.3