X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=d8c0510f91c35dcb52da52586a3e6628a27e2611;hb=b6acba899f44ba9422476022c775cef823fc9337;hp=6cde4f714d9e6ba38dcb4a78f22ac88f179ad804;hpb=3bd04877a6233d5f95c0b790e8ee4eab24317f55;p=senf.git diff --git a/SConstruct b/SConstruct index 6cde4f7..d8c0510 100644 --- a/SConstruct +++ b/SConstruct @@ -31,10 +31,18 @@ linklint Check links of doxygen documentation with 'linklint' fixlinks Fix broken links in doxygen documentation all_valgrinds Run all tests under valgrind/memcheck lcov Generate test coverage output in doc/lcov and lcov.info + +You may execute targets on a remote host (if the directory layout is the same) +by calling + + scons @[@] """) env.Append( - ENV = { 'PATH' : os.environ.get('PATH'), 'HOME' : os.environ.get('HOME') }, + ENV = { 'PATH' : os.environ.get('PATH'), + 'HOME' : os.environ.get('HOME'), + 'SSH_AGENT_PID': os.environ.get('SSH_AGENT_PID'), + 'SSH_AUTH_SOCK': os.environ.get('SSH_AUTH_SOCK') }, CLEAN_PATTERNS = [ '*~', '#*#', '*.pyc', 'semantic.cache', '.sconsign*' ], BUILDDIR = '${FLAVOR and "#/build/$FLAVOR" or "#"}', @@ -92,7 +100,8 @@ env.SetDefault( LCOV = "lcov", GENHTML = "genhtml", SCONSBIN = env.File("#/tools/scons"), - SCONS = "@$SCONSBIN -Q -j$CONCURRENCY_LEVEL", + SCONSARGS = [ '-Q', '-j$CONCURRENCY_LEVEL', 'debug=$debug', 'final=$final' ], + SCONS = "@$SCONSBIN $SCONSARGS", CONCURRENCY_LEVEL = env.GetOption('num_jobs') or 1, TOPDIR = env.Dir('#').abspath, LIBADDSUFFIX = '${FLAVOR and "_$FLAVOR" or ""}', @@ -195,3 +204,16 @@ if env.GetOption('clean') and 'all' in BUILD_TARGETS: if not env.GetOption('clean') and not os.path.exists(".prepare-stamp"): Execute(Touch(".prepare-stamp")) + +### execute targets on remote hosts +for target in COMMAND_LINE_TARGETS: + if '@' in target: + realtarget, host = target.split('@',1) + cwd=env.GetLaunchDir() + home=os.environ['HOME']+'/' + if cwd.startswith(home) : cwd = cwd[len(home):] + args = [ '$SCONSARGS' ] + if env.GetLaunchDir() != os.getcwd(): + args.append('-u') + env.PhonyTarget(target, [], [ "ssh $HOST scons $SCONSARGS -C $DIR $RTARGET" ], + HOST=host, RTARGET=realtarget, DIR=cwd, SCONSARGS=args)