[Scons-users] implicite include dependencies is not working in scons-2.x.x
Ronny De Clerck
ronny.declerck at advalvas.be
Mon Jan 27 13:48:13 EST 2014
As from version 2 of scons a source file is not rebuild in case a dependent include file is changed. In version 1.3.1 the rebuilding is done correctly. Following is the output of a very small test that seems to confirm this.
+ python --version
Python 2.7.3
+ scons --version
[?1034hSCons by Steven Knight et al.:
script: v1.3.1.r5110, 2010/07/25 16:14:38, by bdeegan on cooldog
engine: v1.3.1.r5110, 2010/07/25 16:14:38, by bdeegan on cooldog
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
+ cat main.cpp
#include "main.h"
int main()
{
return RETURNVALUE;
}
+ cat main.h
#define RETURNVALUE 0
+ cat SConstruct
Program('main.cpp')
+ scons --tree=all
[?1034hscons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c main.cpp
g++ -o main.exe main.o
+-.
+-main.cpp
+-main.exe
| +-main.o
| | +-main.cpp
| | +-main.h
| | +-/bin/g++
| +-/bin/g++
+-main.h
+-main.o
| +-main.cpp
| +-main.h
| +-/bin/g++
+-SConstruct
scons: done building targets.
+ scons
[?1034hscons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
+ echo rubbish > main.h
+ scons
[?1034hscons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c main.cpp
In file included from main.cpp:1:0:
main.h:1:1: error: ‘rubbish’ does not name a type
rubbish
^
scons: *** [main.o] Error 1
scons: building terminated because of errors.
<<< install version 2.3.0 of scons
<<< remove .o, .exe, .socnsign.dblite
<<< repair main.h
+ scons --version
[?1034hSCons by Steven Knight et al.:
script: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep
engine: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep
engine path: ['/usr/lib/scons-2.3.0/SCons']
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation
+ scons --tree=all
[?1034hscons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c main.cpp
g++ -o main.exe main.o
+-.
+-main.cpp
+-main.exe
| +-main.o <<<< There is no main.h dependency !!!
| | +-main.cpp
| | +-/bin/g++
| +-/bin/g++
+-main.o
| +-main.cpp
| +-/bin/g++
+-SConstruct
scons: done building targets.
+ scons
[?1034hscons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
+ echo rubbish > main.h
+ scons
[?1034hscons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date. <<<< main.o is not recompiled !!!
scons: done building targets.
Best regards,
Ronny.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140127/ce1b5d61/attachment-0001.html
More information about the Scons-users
mailing list