Skip to content
Snippets Groups Projects
Commit c5a7d137 authored by g0dil's avatar g0dil
Browse files

Replace SENFSCons.InstallIncludeFiles with InstallSubdir builder calls

parent 6a840e6e
No related branches found
No related tags found
No related merge requests found
Showing
with 59 additions and 21 deletions
......@@ -17,7 +17,8 @@
*.test.checked
.sconsign*
*~
#*#
*#
.#*
# File names to ignore in all directories
all_includes.hh
......
......@@ -17,4 +17,4 @@ SENFSCons.Doxygen(env, extra_sources=[
env.Dia2Png('classes.dia'),
env.Dia2Png('ratestuffer.dia'),
])
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -9,6 +9,7 @@ sources, includes = SENFSCons.Glob(env)
SENFSCons.Object(env, target='80211Bundle', sources=sources)
SENFSCons.Lib(env, sources=sources[0])
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
SConscript(glob.glob("*/SConscript"))
......@@ -9,6 +9,7 @@ sources, includes = SENFSCons.Glob(env)
SENFSCons.Object(env, target='DefaultBundle', sources=sources)
SENFSCons.Lib(env, sources[0])
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
SConscript(glob.glob("*/SConscript"))
......@@ -9,4 +9,5 @@ sources, includes = SENFSCons.Glob(env)
SENFSCons.Object(env, target='MPEGDVBBundle', sources=sources)
SENFSCons.Lib(env, sources[0])
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -57,7 +57,8 @@ SENFSCons.Doxygen(env, extra_sources = [
env.PkgDraw("MPEGDVBBundle/SNDUPacket.hh"),
env.PkgDraw("MPEGDVBBundle/TransportPacket.hh"),
])
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
SConscript(glob.glob("*/SConscript"))
......@@ -18,11 +18,12 @@ env.Tool('CopyToDir', [ 'senfscons' ])
env.Tool('CompileCheck', [ 'senfscons' ])
env.Tool('Boost', [ 'senfscons' ])
env.Tool('BoostUnitTests', [ 'senfscons' ])
env.Tool('InstallSubdir', [ 'senfscons' ])
env.Help("""
Additional top-level build targets:
prepare Create all source files not part of the repository
prepare Create all target files not part of the repository
all_tests Build and run unit tests for all modules
all_docs Build documentation for all modules
all Build everything
......@@ -39,7 +40,7 @@ class BuildTypeOptions:
def __init__(self, var):
self._var = var
def __call__(self, source, target, env, for_signature):
def __call__(self, target, source, env, for_signature):
type = env['final'] and "final" or env['debug'] and "debug" or "normal"
return env[self._var + "_" + type]
......@@ -147,7 +148,8 @@ env.Default(libsenf)
env.Clean('all', libsenf)
env.Alias('default', libsenf)
SENFSCons.InstallIncludeFiles(env, [ 'config.hh' ])
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = [ 'config.hh' ])
env.Alias('install_all', env.Install('$LIBINSTALLDIR', libsenf))
if env.GetOption('clean'):
......
......@@ -9,4 +9,5 @@ sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.Doxygen(env)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -13,4 +13,5 @@ SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh")
sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -13,4 +13,5 @@ SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh")
sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -13,4 +13,5 @@ SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh")
sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -9,4 +9,5 @@ SConscript(glob.glob("*/SConscript"))
sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -13,4 +13,5 @@ SENFSCons.AllIncludesHH(env, [ f for f in glob.glob("*.hh")
sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib( env, sources)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -20,4 +20,5 @@ SENFSCons.Doxygen(env, extra_sources = [
env.Dia2Png('Protocols.dia'),
env.Dia2Png('Handle.dia'),
])
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -9,5 +9,7 @@ sources, includes = SENFSCons.Glob(env, exclude=['testServer.cc'])
SENFSCons.Lib(env, sources)
SENFSCons.Doxygen(env)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
SENFSCons.Binary(env, "testServer", ['testServer.cc'])
......@@ -9,4 +9,5 @@ sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.Doxygen(env)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -13,4 +13,5 @@ sources, includes = SENFSCons.Glob(env)
SENFSCons.Lib(env, sources)
SENFSCons.Doxygen(env)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
......@@ -9,6 +9,7 @@ sources, includes = SENFSCons.Glob(env, subdirs=[ 'impl' ])
SENFSCons.Lib(env, sources)
SENFSCons.Doxygen(env)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
SConscript(glob.glob("*/SConscript"))
......@@ -9,5 +9,7 @@ sources, includes = SENFSCons.Glob(env, exclude=[ 'telnetServer.cc'])
SENFSCons.Lib(env, sources)
SENFSCons.Doxygen(env)
SENFSCons.InstallIncludeFiles(env, includes)
env.InstallSubdir(target = '$INCLUDEINSTALLDIR', source = includes)
SENFSCons.Binary(env, "telnetServer", ['telnetServer.cc'])
import SCons.Errors
def InstallSubdir(env, target=None, source=None, base='#', **kw):
builds = []
target = env.arg2nodes(target, env.fs.Dir)
if len(target) != 1:
raise SCons.Errors.UserError, "Need exactly one target for InstallWithDir()"
base = env.arg2nodes(base, env.fs.Dir)[0]
for src in env.arg2nodes(source, env.fs.Entry):
builds.extend(apply(env.Install, (target[0].Dir(src.dir.get_path(base)), src), kw))
return builds
def generate(env):
env['BUILDERS']['InstallSubdir'] = InstallSubdir
def exists(env):
return 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment