#
# Copyright (C) 2010 <NAME>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from SCons.Script import *
import os

#
# Always execute the given commands as SCons targets.
#
# @author GregNoel
# @see http://www.scons.org/wiki/PhonyTargets
#
def Targets(env, **kw):

    # Generate an environment, if not given.
    if not env: env = DefaultEnvironment()

    # Make sure to pass the whole environment to the command.
    env.Append(ENV = os.environ)

    # Execute all targets
    for target,action in kw.items():
        env.AlwaysBuild(env.Alias(target, [], action))

#
# Add ourselves to the given environment.
#
def generate(env):
    env.AddMethod(Targets)

#
# We always exist.
#
def exists(env):
    return True

#
# Copyright (C) 2010 <NAME>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from SCons.Script import *
import os

#
# Always execute the given commands as SCons targets.
#
# @author GregNoel
# @see http://www.scons.org/wiki/PhonyTargets
#
def Targets(env, **kw):

    # Generate an environment, if not given.
    if not env: env = DefaultEnvironment()

    # Make sure to pass the whole environment to the command.
    env.Append(ENV = os.environ)

    # Execute all targets
    for target,action in kw.items():
        env.AlwaysBuild(env.Alias(target, [], action))

#
# Add ourselves to the given environment.
#
def generate(env):
    env.AddMethod(Targets)

#
# We always exist.
#
def exists(env):
    return True

# # Copyright (C) 2010 <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program.  If not, see <http://www.gnu.org/licenses/>. # # # Always execute the given commands as SCons targets. # # @author GregNoel # @see http://www.scons.org/wiki/PhonyTargets # # Generate an environment, if not given. # Make sure to pass the whole environment to the command. # Execute all targets # # Add ourselves to the given environment. # # # We always exist. #