Example "rtconfig.h" content:
...
//#define BOARD_USING_LED
#if defined(BOARD_USING_LED)
#define RT_USING_RTGUI
#endif
...
- Before patching, RTGUI module will be built although not intend to do so.
- After patching, RTGUI module will not be built.
If the src is empty list, it will crash at:
IndexError: list index out of range:
File "/home/xxx/src/SConstruct", line 39:
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=True)
...
File "/home/xxx/src/drivers/SConscript", line 12:
SrcRemove(src, src_need_remove)
File "/home/rt-thread-stable/tools/building.py", line 496:
if type(src[0]) == type('str'):
Dict Comprehensions is imported in Python 2.7 & 3.0 which is PEP 274 [1]. Some
OS like CentOS 6 which is use Python 2.6 cannot support this syntex.
[1] http://legacy.python.org/dev/peps/pep-0274/
Signed-off-by: Xiongfei Guo <xfguo@credosemi.com>
The startupinfo does not have any visible effects on the building
process and some old Python version does not have it at all. So remove
it for the seek of simple.
Tested `scons -j4` in a dual core virtual machine.
Windows(tm) CreateProcess does not use the env passed to it to find the
executables. So we have to modify our own PATH to make Popen work. Also,
detect the cmd build-in commands and execute it directly.
Tested on MDK toolchain on RB4088 and the MSVS toolchain on simulator
BSP.
In SCons manual:
=================
In order to inform the C compiler about the repositories, SCons will
add appropriate -I flags to the compilation commands for each directory
in the $CPPPATH list. So if we add the current directory to the
construction environment $CPPPATH like so:
env = Environment(CPPPATH = ['.'])
env.Program('hello.c')
Repository('/usr/repository1')
Then re-executing SCons yields:
% scons -Q
cc -o hello.o -c -I. -I/usr/repository1 hello.c
cc -o hello hello.o
=================
The additional include directory is definitely not what we want. Just
remove the additional Repository line.