3 def InstallSubdir(env, target=None, source=None, base='#', **kw):
5 target = env.arg2nodes(target, env.fs.Dir)
7 raise SCons.Errors.UserError, "Need exactly one target for InstallWithDir()"
8 base = env.arg2nodes(base, env.fs.Dir)[0]
9 for src in env.arg2nodes(source, env.fs.Entry):
10 builds.extend(apply(env.Install, (target[0].Dir(src.dir.get_path(base)), src), kw))
14 env['BUILDERS']['InstallSubdir'] = InstallSubdir