view site_scons/site_tools/copyrecurse/__init__.py @ 17:15107282d9eb

Redefined SYSCONFDIR installation path variable so that it appends APPNAME. * Although this deviates from GNU standards this relatively minor change makes it easier to write paths that are portable to Windows.
author M. George Hansen <technopolitica@gmail.com>
date Thu, 09 Jun 2011 21:40:51 -1000
parents 4706e0194af3
children
line wrap: on
line source

import os

from .CopyRecurseAction import copyRecurseAction

def emit(target, source, env):
    target = [env.fs.Entry(os.path.join(str(target[0]), str(source[0])))]
    return target, source

def generate(env):
    CopyRecurseBuilder = env.Builder(
        action=copyRecurseAction,
        emitter=emit,
        source_factory=env.fs.Entry,
        target_factory=env.fs.Dir,
        multi=1,
    )
    env.Append(BUILDERS={'CopyRecurse': CopyRecurseBuilder})

def exists(env):
    return True