summaryrefslogtreecommitdiff
path: root/tools/building.py
AgeCommit message (Collapse)Author
2014-11-19Delete trailing whitespaceBright Pan
2014-11-18SCons: allow set object files in DefineGroupGrissiom
The source files can be the raw file names end with .c or .o. So return the raw file names is more flexible than wrap them with Object.
2014-10-08tools: fix SrcRemove on empty srcGrissiom
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'):
2014-10-08tools: preserve the order of CPPPATH/CPPDEFINES/LIBPATH/LIBSGrissiom
The order of them are important while the uniqueness has nothing to do with the compiling.
2014-09-06Remove unsupport syntex for python 2.6.Xiongfei Guo
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 <[email protected]>
2014-09-01tools/building: remove the use of startupinfoGrissiom
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.
2014-06-09tools/building.py: more descriptive on errorGrissiom
Print the command that failed to execute and try to tell the reason to fall.
2014-05-24Scons: fix the Win32SpawnGrissiom
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.
2014-04-10scons: no need to set RTT_ROOT as RepositoryGrissiom
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.
2014-04-10scons: seperate the BSP build with the kernel buildGrissiom
BSPs could have their own components/ etc. If they point to the same folder, SCons would find the wrong source code to compile.
2014-03-24Add UA building script.bernard
2014-02-25[JS] fix the include path issueBernard Xiong
2014-02-23[scons] Add the library to the group when used buildlib buildingbernard
2014-02-16[scons] Use a single path for group (ci build)Bernard Xiong
2014-02-15[scons] fix library suffix issue.bernard
2014-02-07Add more feature on buildlibbernard
2013-10-01scons script: support to generate vs2012 project xmlprife
rename template.vcproj to template_vs2005.vcproj add template_vs2012.vcxproj NOTE: the vs2012.py is ugly, just can work.
2013-09-07Scons: run `clang -Wall -fsyntax-only` in clang-analyzeGrissiom
The `clang -fsyntax-only` will give us additional warning messages in the console.
2013-08-09add buildlib for Keil MDKbernard
2013-07-09building.py: add clang static analyzer supportGrissiom
It adds the '--clang-analyzer' option that could invoke clang as the static code checker. It is recommanded to work with 'scan-build' shipped with Clang. For example, `scan-build scons --clang-analyzer`.
2013-06-19tools: add an option to generate cscope databaseGrissiom
When --cscope option is given to Scons, it will generate a cscope cross-reference database in current directory, which is useful in Vim(and other cscope-aware text editors). For example, `scons -s --cscope` will do nothing except generating the database. You can use this option with other options together. It is inspired by the `make cscope` of Linux.
2013-03-31add more command string for sconsRogerz Zhang
2013-03-01tools script: fix up mdk460 link errorprife
2013-02-24building.py: append messed up objs list, use extend to avoid thatGrissiom
The return type of SConscript is a subclass of UserList. We should use extend to keep the depth of the list is always 1 when concatenate SConscript return values. Thanks prife for making me realize that this is really a problem. Reported-and-Tested-by: prife
2013-02-21update scons: support C::Baozima
2013-01-29Rename `--default-comstr` to `--verbose`Rogerz Zhang
2013-01-19Use customized command string in sconsRogerz Zhang
2012-12-13add compability with MDK 4.6 which changes directory of armcc.exe[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2479 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-12-01support header files addition for vs script[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2461 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-11-07Add Visual Studio project generation script.bernard.xiong
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2398 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-11-05Fix LIBS and LIBPATH merge in building script.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2393 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-15building.py: add RegisterPreBuildingAction[email protected]
One could register a callable object(normally a function) via RegisterPreBuildingAction in SConscript. It will be called when PreBuilding get invoked. PreBuilding should be called before the building procedure. It is currently used by RTGUI to generate the minimal perfect hash code when all the source files are scanned(i.e. just before building). Maybe we should invoke PreBuilding in DoBuilding. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2353 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-06Update GlobSubDir() function.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2321 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-06Add GlobSubDir() function in building.py; Fix the import issue in wizard.py.bernard.xiong
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2320 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-10-05Add buildlib option; Add wizard script.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2316 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-09-09add GetConfigValue() by Grissiom.wuyangyong
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2284 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-08-22add --copy-header option to copy header of RT-Thread to local.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2257 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-08-11Add MakeCopy function on the building script. [email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2252 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-08-01fix the win32 path issue.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2244 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-07-31Fix the GNU GCC path issue.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2241 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-07-22add "remove_components" feature[email protected]
If one do not want to use some components in the RTT_ROOT, it can pass a remove_components=['the_component'] parameter to PrepareBuilding. Sample code is: RTT_RTGUI = os.getenv('RTT_RTGUI') # if GUI dir is set to other place, don't use the one in RTT_ROOT if RTT_RTGUI: # prepare building environment objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False, remove_components=['rtgui']) objs += SConscript(os.path.join(RTT_RTGUI, 'SConscript')) else: objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) You can safely omit the parameter if you do not want to remove any components. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2227 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-02-19fixed RTT_ROOT directory issue if there is a components directory under BSP.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1972 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-02-19cleanup the building script in tools.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1970 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-02-17fix GNU GCC path issue in building script.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1953 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-02-17fix print out warning information when use GCC as compiler.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1952 bbd45198-f89e-11dd-88c7-29a3b14d5316
2012-01-31fix bugs in building.py that is when DefineGroup method's 3rd arges ↵[email protected]
"CPPDEFINES" is not null, then "scons --target=mdk -s" will get errors. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1930 bbd45198-f89e-11dd-88c7-29a3b14d5316
2011-12-10add merge group function.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1832 bbd45198-f89e-11dd-88c7-29a3b14d5316
2011-12-10update SrcRemove function in building script.[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1830 bbd45198-f89e-11dd-88c7-29a3b14d5316
2011-11-29add source remove method[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1816 bbd45198-f89e-11dd-88c7-29a3b14d5316
2011-11-09if --target is set, adjust CROSS_TOOL and PLATFORM automatically[email protected]
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1792 bbd45198-f89e-11dd-88c7-29a3b14d5316