From 48f19e9e5ecc069f379ad433fdaf280ac9b54e16 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 23 Jan 2010 15:22:02 +0100 Subject: Imported Upstream version 1.2.0.d20100117 --- doc/user/depends.xml | 99 ++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 49 deletions(-) (limited to 'doc/user/depends.xml') diff --git a/doc/user/depends.xml b/doc/user/depends.xml index b72f41f..d386a1f 100644 --- a/doc/user/depends.xml +++ b/doc/user/depends.xml @@ -1,6 +1,6 @@ @@ -1568,7 +1559,7 @@ If we list version.c as an actual source file, - though, then version.o + though, then the version.o file will get rebuilt every time we run &SCons; (because the &SConstruct; file itself changes the contents of version.c) @@ -1578,27 +1569,30 @@ - + (Note that for the above example to work, + we &sleep; for one second in between each run, + so that the &SConstruct; file will create a + version.c file with a time string + that's one second later than the previous run.) - - % scons -Q - gcc -o hello.o -c hello.c - gcc -o version.o -c version.c - gcc -o hello hello.o version.o - % scons -Q - gcc -o version.o -c version.c - gcc -o hello hello.o version.o - % scons -Q - gcc -o version.o -c version.c - gcc -o hello hello.o version.o - + @@ -1644,28 +1638,35 @@ With these changes, - we get the desired behavior of - re-building the version.o file, - and therefore re-linking the hello executable, - only when the hello.c has changed: + we get the desired behavior of only + re-linking the hello executable + when the hello.c has changed, + even though the version.o is rebuilt + (because the &SConstruct; file still changes the + version.c contents directly each run): - % scons -Q + % scons -Q hello cc -o version.o -c version.c cc -o hello.o -c hello.c cc -o hello version.o hello.o - % scons -Q - scons: `.' is up to date. + % sleep 1 + % scons -Q hello + cc -o version.o -c version.c + scons: `hello' is up to date. + % sleep 1 % edit hello.c [CHANGE THE CONTENTS OF hello.c] - % scons -Q + % scons -Q hello cc -o version.o -c version.c cc -o hello.o -c hello.c cc -o hello version.o hello.o - % scons -Q - scons: `.' is up to date. + % sleep 1 + % scons -Q hello + cc -o version.o -c version.c + scons: `hello' is up to date. -- cgit v1.2.3