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