25 from SCons.Script
import PathVariable, EnumVariable, BoolVariable, Help
31 def defineCmdlineVariables(buildVars):
32 """ several toggles and configuration variables can be set on the commandline, 33 current settings will be persisted in a options cache file. 34 you may define custom variable settings in a separate file. 35 Commandline will override both. 37 buildVars.AddVariables(
38 (
'ARCHFLAGS',
'Set architecture-specific compilation flags (passed literally to gcc)',
'')
39 ,(
'CC',
'Set the C compiler to use.',
'gcc')
40 ,(
'CXX',
'Set the C++ compiler to use.',
'g++')
41 ,PathVariable(
'CCACHE',
'Integrate with CCache',
'', PathVariable.PathAccept)
42 ,PathVariable(
'DISTCC',
'Invoke C/C++ compiler commands through DistCC',
'', PathVariable.PathAccept)
43 ,EnumVariable(
'BUILDLEVEL',
'NoBug build level for debugging',
'ALPHA', allowed_values=(
'ALPHA',
'BETA',
'RELEASE'))
44 ,BoolVariable(
'DEBUG',
'Build with debugging information and no optimisations',
False)
45 ,BoolVariable(
'OPTIMIZE',
'Build with strong optimisation (-O3)',
False)
46 ,BoolVariable(
'VALGRIND',
'Run Testsuite under valgrind control',
True)
47 ,BoolVariable(
'VERBOSE',
'Print full build commands',
False)
48 ,(
'TESTSUITES',
'Run only test suites matching the given pattern',
'')
49 ,(
'TESTMODE',
'test suite error mode for test.sh',
'')
53 ,PathVariable(
'PREFIX',
'Installation dir prefix',
'usr/local', PathVariable.PathAccept)
54 ,PathVariable(
'INSTALLDIR',
'Root output directory for install. Final installation will happen in INSTALLDIR/PREFIX/... ',
'/', PathVariable.PathIsDir)
55 ,PathVariable(
'PKGLIBDIR',
'Installation dir for plugins, defaults to PREFIX/lib/lumiera/modules',
'',PathVariable.PathAccept)
56 ,PathVariable(
'PKGDATADIR',
'Installation dir for default config, usually PREFIX/share/lumiera',
'',PathVariable.PathAccept)
61 def prepareOptionsHelp(buildVars,env):
63 USAGE: scons [-c] [OPTS] [key=val [key=val...]] [TARGETS] 64 Build and optionally install Lumiera. 65 Without specifying any target, just the (re)build target will run. 66 Add -c to the commandline to clean up anything a given target would produce 69 build : just compile and link 70 research: build experimental code (might fail) 71 testcode: additionally compile the Testsuite 72 check : build and run the Testsuite 73 doc : generate documentation (Doxygen) 74 all : build and testcode and doc 75 install : install created artifacts at PREFIX 77 Configuration Options: 79 Help(prelude + buildVars.GenerateHelpText(env))