###########################################################################
+# This hack is needed for SCons V 0.96.1 compatibility. In current SCons versions
+# we can just use 'env.AlwaysBuild(env.Alias(target), [], action)'
def PhonyTarget(env, target, action):
env.AlwaysBuild(env.Command(target + '.phony', 'SConstruct', env.Action(action)))
env.Alias(target, target + '.phony')
SENFSCons.LibPath('senf'),
Flatten([ env.File(SENFSCons.LibPath(lib)).sources for lib in env['ALLLIBS'] ]))
env.Default(libsenf)
+env.Clean('all', 'libsenf.a')
+env.Alias('all', 'libsenf.a')
+
env.Alias('install_all', env.Install('$LIBINSTALLDIR', libsenf))
env.Clean('all', [ os.path.join(path,f)
return self._items
def DoxyfileParse(env,file):
+ # We don't parse source files which do not contain the word 'doxyfile'. SCons will
+ # pass other dependencies to DoxyfileParse which are not doxyfiles ... grmpf ...
+ if not 'doxyfile' in file.lower():
+ return {}
ENV = {}
ENV.update(env.get("ENV",{}))
ENV['TOPDIR'] = env.Dir('#').abspath
#
# \ingroup target
def GlobalTargets(env):
- env.Depends(env.Alias('all'),'#')
+ env.Alias('all', [ 'default', 'all_tests', 'all_docs' ])
## \brief Return path of a built library within $LOCALLIBDIR
# \internal
lib = env.Library(env.File(LibPath(library)),objects)
env.Default(lib)
env.Append(ALLLIBS = library)
+ env.Alias('default', lib)
install = InstallWithSources(env, lib, '$LIBINSTALLDIR', sources, testSources, no_includes)
env.Alias('install_all', install)
return lib
if objects:
ob = env.Command(target+".o", objects, "ld -r -o $TARGET $SOURCES")
env.Default(ob)
+ env.Alias('default', ob)
install = InstallWithSources(env, ob, '$OBJINSTALLDIR', sources, testSources, no_includes)
env.Alias('install_all', install)
return ob
program = progEnv.Program(target=binary,source=objects+OBJECTS)
env.Default(program)
env.Depends(program, [ env.File(LibPath(x)) for x in LIBS ])
+ env.Alias('default', program)
install = InstallWithSources(env, program, '$BININSTALLDIR', sources, testSources,
no_includes)
env.Alias('install_all', install)
def AllIncludesHH(env, headers):
headers.sort()
file(env.File("all_includes.hh").abspath,"w").write("".join([ '#include "%s"\n' % f
- for f in headers ]))
- env.Clean('all','all_includes.hh')
+ for f in headers ]))
+ env.Alias('all', 'all_includes.hh')
+ env.Clean('all', 'all_includes.hh')