def mc60_init(env): CORE = env.BoardConfig().get("build.core") # "mc60" CORE_DIR = join(env.PioPlatform().get_package_dir("framework-quectel"), "opencpu", CORE) env.Append( CPPDEFINES=["OPENCPU", "CORE_" + CORE.upper()], # -D CPPPATH=[ # -I CORE_DIR, join(CORE_DIR, "include"), join(CORE_DIR, "ril", "inc"), join(CORE_DIR, "fota", "inc"), ], CFLAGS=[ "-march=armv5te", "-mfloat-abi=soft", "-mfpu=vfp", "-fsingle-precision-constant", "-mthumb", "-mthumb-interwork", "-std=c99", "-Os", "-Wall", "-fno-builtin", "-Wstrict-prototypes", "-Wp,-w", ], LINKFLAGS=[ "-march=armv5te", "-mfloat-abi=soft", "-mfpu=vfp", "-mthumb", "-mthumb-interwork", "-nostartfiles", "-Rbuild", "-Wl,--gc-sections,--relax", ], LIBPATH=[CORE_DIR], LDSCRIPT_PATH=join(CORE_DIR, "linkscript.ld"), LIBS=["gcc", "m", "app_start"], BUILDERS=dict( ElfToBin=Builder(action=env.VerboseAction( " ".join(["$OBJCOPY", "-O", "binary", "$SOURCES", "$TARGET"]), "Building $TARGET"), suffix=".dat"), MakeHeader=Builder( # Add BIN Header action=env.VerboseAction(mc60_header, "Adding GFH header"), suffix=".bin")), #dict UPLOADCMD=mc60_uploader) # env.Append libs = [] libs.append( env.BuildLibrary(join("$BUILD_DIR", "framework"), join(CORE_DIR))) libs.append( env.BuildLibrary(join("$BUILD_DIR", "framework", "ril"), join(CORE_DIR, "ril", "src"))) libs.append( env.BuildLibrary(join("$BUILD_DIR", "framework", "fota"), join(CORE_DIR, "fota", "src"))) env.Append(LIBS=libs)
def addGettextBuilder(env): env.Append(BUILDERS = { 'Gettext': Builder( action = Action("$GETTEXTCOM", "$GETTEXTCOMSTR"), suffix = '.mo', src_suffix = '.po', single_source = True, ), 'Xgettext': Builder( action = Action("$XGETTEXTCOM", "$XGETTEXTCOMSTR"), suffix = '.pot', src_suffix = '.cpp', single_source = False, ), 'Msgmerge': Builder( action = Action("$MSGMERGECOM", "$MSGMERGECOMSTR"), suffix = '.pot', src_suffix = '.pot', single_source = False, ), 'Msgcat': Builder( action = Action("$MSGCATCOM", "$MSGCATCOMSTR"), suffix = '.pot', src_suffix = '.pot', single_source = False, ), }) env["GETTEXT"] = env.Detect("msgfmt") env["GETTEXTCOM"] = "$GETTEXT --check-format --check-domain -f -o $TARGET $SOURCE" env["XGETTEXT"] = env.Detect("xgettext") env["XGETTEXTCOM"] = "$XGETTEXT --keyword=_ --from-code utf-8 --package-name=gpick $XGETTEXT_FLAGS --output=$TARGET $SOURCES" env["MSGMERGE"] = env.Detect("msgmerge") env["MSGMERGECOM"] = "$MSGMERGE $MSGMERGE_FLAGS --output-file=$TARGET $SOURCES" env["MSGCAT"] = env.Detect("msgcat") env["MSGCATCOM"] = "$MSGCAT $MSGCAT_FLAGS --output-file=$TARGET $SOURCES"
def init(env): # Sets a dictionary that will store calls to CreateExternalLibraryComponent(). env.ExternalDependenciesCreateComponentsDict = {} # We try to get in which distro we are. try: global DISTRO global MANAGER DISTRO = utils.GetDistro() if DISTRO == utils.DISRTO_ARCH: MANAGER = 'PACMAN' else: MANAGER = 'APT-GET' except fbuild_exceptions.DistroError: env.Cprint('[warn] unsupported distribution.', 'yellow') # Create a builder for the checkout of the dependencies. coDep = SCons.Action.Action(CheckoutDependency, CheckoutDependencyMessage) checkoutBuilder = Builder(action=coDep) env.Append(BUILDERS={'CheckoutDependency': checkoutBuilder}) # Create a builder for the update of the dependencies. upDep = SCons.Action.Action(UpdateDependency, UpdateDependencyMessage) updateBuilder = Builder(action=upDep) env.Append(BUILDERS={'UpdateDependency': updateBuilder}) # Creates projects targets. _CreateProjectsDependenciesTargets(env) # Create external dependencies targets. _CreateExternalDependenciesTargets(env) # Puts a public function within the environment. env.CheckoutDependencyNow = CheckoutDependencyNow env.GetComponentDeps = GetComponentDeps
def generate(env): gcr = env.Detect('glib-compile-resources') env.SetDefault(GLIB_COMPILE_RESOURCES=gcr) if env['GLIB_COMPILE_RESOURCES'] is None: print("Could not find glib-compile-resources") env.Exit(1) env.AddMethod(gresource_bundle_builder_wrapper, 'GResourceBundle') env.AddMethod(gresource_method, 'GResource') env['BUILDERS']['_GResourceXMLInternal'] = Builder( action=Action( gresource_xml_build, cmdstr="Generating $TARGET", ), target_factory=env.File, source_factory=GResourceEntry, source_scanner=Scanner( function=gresource_entry_scan, skeys=[GResourceEntry.SCANNER_KEY], ), ) env['BUILDERS']['_GResourceFileInternal'] = Builder( action=Action( '$GLIB_COMPILE_RESOURCES --target=$TARGET $SOURCE', cmdstr="Bundling $TARGET", ), source_scanner=Scanner(function=gresource_xml_scan, ), )
def ec2x_init(env): DIR = os.path.dirname(env.get("BUILD_SCRIPT")) CORE = env.BoardConfig().get("build.core") # "ec2x" CORE_DIR = join(env.PioPlatform().get_package_dir("framework-quectel"), "openlinux", CORE) MDM_DIR = env.BoardConfig().get("build.mdm", "") if MDM_DIR != "": MDM_DIR = join(MDM_DIR, "usr") env.Replace(PROGNAME="openlinux", PROGSUFFIX='') env.Append( CPPDEFINES=["OPENLINUX", "CORE_" + CORE.upper()], # -D CPPPATH=[ # -I CORE_DIR, join(CORE_DIR, "interface"), join(MDM_DIR, "include"), ], CFLAGS=[ "-march=armv7-a", "-mtune=cortex-a7", "-mfloat-abi=softfp", "-mfpu=neon", "-std=gnu11" ], CXXFLAGS=["-std=gnu++11"], LINKFLAGS=[ "-march=armv7-a", "-mtune=cortex-a7", "-mfloat-abi=softfp", "-mfpu=neon", ], LIBPATH=[ join(CORE_DIR, "interface"), join(MDM_DIR, "lib") ], LIBS=["m", "pthread"], BUILDERS = dict( ElfToBin = Builder(action="", suffix=".1"), MakeHeader = Builder(action="", suffix=".2") ), # dict UPLOADCMD = ec2x_uploader ) # env.Append libs = [] libs.append( env.BuildLibrary( join("$BUILD_DIR", "framework"), join( CORE_DIR ), )) libs.append( env.BuildLibrary( join("$BUILD_DIR", "framework", "interface"), join(CORE_DIR, "interface") )) env.Append( LIBS = libs )
def RegisterSnakeBuilders(self): proto_cpp_action = Action('$PROTOCCOM', '$PROTOCCOMSTR') proto_cpp_builder = Builder(action=proto_cpp_action, emitter=_proto_cpp_emitter, src_suffix='.proto') proto_py_action = Action('$PROTOPYCCOM', '$PROTOPYCCOMSTR') proto_py_builder = Builder(action=proto_py_action, emitter=_proto_py_emitter, src_suffix='.proto') return { 'ProtoCppLibrary': proto_cpp_builder, 'ProtoPyLibrary': proto_py_builder }
def Environment(variables, configfiles, version=None, service_module=None, config_class=saliweb.backend.Config): buildmap = _add_build_variable(variables, configfiles) variables.Add( SCons.Script.PathVariable( 'html_coverage', 'Directory to output HTML coverage reports into', None, SCons.Script.PathVariable.PathIsDirCreate)) variables.Add( SCons.Script.BoolVariable('coverage', 'Preserve output coverage files', False)) env = SCons.Script.Environment(variables=variables) # Inherit some variables from the environment: if 'PERL5LIB' in os.environ: env['ENV']['PERL5LIB'] = os.environ['PERL5LIB'] if 'PATH' in os.environ: env['ENV']['PATH'] = os.environ['PATH'] configfile = buildmap[env['build']] env['configfile'] = File(configfile) env['config'] = config = config_class(configfile) _setup_sconsign(env) _setup_version(env, version) _setup_service_name(env, config, service_module) _setup_install_directories(env) if not env.GetOption('clean') and not env.GetOption('help'): _check(env) _install_config(env) _install_directories(env) env.AddMethod(_InstallAdminTools, 'InstallAdminTools') env.AddMethod(_InstallCGIScripts, 'InstallCGIScripts') env.AddMethod(_InstallPython, 'InstallPython') env.AddMethod(_InstallHTML, 'InstallHTML') env.AddMethod(_InstallTXT, 'InstallTXT') env.AddMethod(_InstallCGI, 'InstallCGI') env.AddMethod(_InstallPerl, 'InstallPerl') env.AddMethod(_make_frontend, 'Frontend') env.Append(BUILDERS={'RunPerlTests': Builder(action=builder_perl_tests)}) env.Append(BUILDERS={'RunPythonTests': \ Builder(action=builder_python_tests)}) install = env.Command('install', None, Action(_install_check, 'Check installation ...')) env.AlwaysBuild(install) env.Requires(install, env['config'].directories.values()) env.Default(install) return env
def ec2x_init(env): ec2x_compiler(env) VARIANT = env.BoardConfig().get("build.variant") CORE = env.BoardConfig().get("build.core") # "ec2x" CORE_DIR = join(env.PioPlatform().get_package_dir("framework-quectel"), "arduino", "cores", CORE) env.Replace(PROGNAME="arduino", PROGSUFFIX='') env.Append( CPPDEFINES=["ARDUINO", "CORE_" + CORE.upper()], # -D CPPPATH=[ # -I CORE_DIR, join(CORE_DIR, "avr"), join(CORE_DIR, "interface"), join(env.PioPlatform().get_package_dir("framework-quectel"), "arduino", "variants", VARIANT), ], CFLAGS=[ "-march=armv7-a", "-mtune=cortex-a7", "-mfloat-abi=softfp", "-mfpu=neon", "-std=gnu11" ], CXXFLAGS=["-std=gnu++11"], LINKFLAGS=[ "-march=armv7-a", "-mtune=cortex-a7", "-mfloat-abi=softfp", "-mfpu=neon", ], #LIBPATH=[CORE_DIR], #LDSCRIPT_PATH=join(CORE_DIR, "linkscript.ld"), LIBS=["m", "pthread"], BUILDERS=dict(ElfToBin=Builder(action="", suffix=".1"), MakeHeader=Builder(action="", suffix=".2")), # dict UPLOADCMD=ec2x_uploader) # env.Append libs = [] libs.append( env.BuildLibrary( join("$BUILD_DIR", "framework"), join(CORE_DIR), )) libs.append( env.BuildLibrary(join("$BUILD_DIR", "framework", "interface"), join(CORE_DIR, "interface"))) libs.append( env.BuildLibrary( join("$BUILD_DIR", "framework", "variant"), join(env.PioPlatform().get_package_dir("framework-quectel"), "arduino", "variants", VARIANT))) env.Append(LIBS=libs)
def addTemplateBuilder(env): def buildEmitter(target, source, env): data = open(source[0].srcnode().get_path()).read() dict = env.Dictionary() keys = dict.keys() for key in keys: if isinstance(dict[key], str): env.Depends(target, env.Value(dict[key])) return target, source def buildFile(target, source, env): source_dest = str(target[0]) wfile = open(source_dest, "w") data = open(source[0].srcnode().get_path()).read() dict = env.Dictionary() keys = dict.keys() for key in keys: if isinstance(dict[key], str): data = re.sub("%" + key + "%", dict[key], data) wfile.write(data) wfile.close() return 0 def buildString(target, source, env): return "Preparing file %s" % os.path.basename(str(target[0])) env.Append( BUILDERS={ 'Template': Builder( action=Action(buildFile, buildString), emitter=buildEmitter, ), })
def generate(env, **kw): """ Add this builder to the 'env'. Called by SCons internally. """ # Check for needed builders, else add it if not env['BUILDERS'].has_key('Download'): env.Tool('download_builder', toolpath=['../scons']) if not env['BUILDERS'].has_key('Extract'): env.Tool('extract_builder', toolpath=['../scons']) # Add command line option to the environment opts = Options(None) opts.Add( PathOption('LIBS_PREFIX', help='Where all libraries are installed', default=os.path.join(Dir('.').abspath, 'local'), validator=PathOption.PathAccept)) opts.Update(env) # Generate command line help Help(opts.GenerateHelpText(env)) # Init LibBuilder properties repository if not env.has_key('LIB_BUILDER'): env['LIB_BUILDER'] = dict() # Add this builder to the env env['BUILDERS']['LibBuilder'] = Builder( action=action, emitter=emitter, target_factory=Alias, source_factory=Value, )
def generate(env): debuginfo_opt = env.get('DEBUGINFO_OPT') if 'rfcfactory' in debuginfo_opt: print "rfc_factory::generate()" rootenv = env.get('IMAGE_ENV') if RFC_FACTORY_GLOBAL_NAME not in rootenv: cardlist = CardList() cardlist.debug = 'rfcfactory' in debuginfo_opt # Card factory data structure and AddRfCard method go into the top-level # environment rootenv[RFC_FACTORY_GLOBAL_NAME] = cardlist rootenv.AddMethod(rfc_factory_add_rf_card, "AddRfCard") else: cardlist = rootenv[RFC_FACTORY_GLOBAL_NAME] # The builder (the thing that creates the .cpp file) only needs to # be in the local environment, since the component that is loading # this module is the one that is expected to create the factory. rfc_factory_builder = Builder(action=rfc_factory_builder_func, suffix='.cpp', emitter=rfc_factory_builder_emitter) env.Append(BUILDERS = {'RfcFactoryBuilder' : rfc_factory_builder}) if cardlist.debug: print " cardlist in rootenv: ", rootenv[RFC_FACTORY_GLOBAL_NAME]
def generate(env): env.AddMethod(wheel_package_builder_wrapper, 'WheelPackage') env.AddMethod(wheel_method, 'Wheel') env['BUILDERS']['_WheelFileInternal'] = Builder( action=Action( wheel_package_build, varlist=[ 'AUTHOR', 'NAME', 'VERSION', 'AUTHOR', 'AUTHOR_EMAIL', 'LICENSE', 'ARCHITECTURE', 'PACKAGE_METADATA', 'SOURCE_URL', 'BUILD', '_WHEEL_ROOT_IS_PURELIB', '_WHEEL_TAG', ], cmdstr="Packaging $TARGET", ), target_factory=env.File, source_factory=lambda s: WheelEntry(s, env.Entry(s)), source_scanner=Scanner( function=wheel_entry_scan, skeys=[WheelEntry.SCANNER_KEY], ), )
def generate(env): """Called when the tool is loaded into the environment at startup of script""" assert (exists(env)) DotnetCoreCommon.setup_opts(env) bld = Builder(action=__DotnetCoreBuild_func, emitter=__DotnetCoreBuild_emitter) env.Append(BUILDERS={'DotnetCoreBuild': bld})
def generate(env): env.AppendUnique(CXXPATH=["/usr/include/catch"]) if not exists(env): raise StopError("Catch header must be found in $CPPPATH/$CXXPATH/$CPATH") catch_test = Builder(generator=generate_catch_test_run) env.AppendUnique(BUILDERS=dict(CatchTest=catch_test))
def _copy_files(self, target_dir): """Copy test harness and file-under-test.""" builder = Builder(action=recursive_template_action, emitter=recursive_template_emitter) _inc_dirs, _sources, headers = unit_test.find_sources('firmware/src') # Render the template env = Environment(tools=[], BUILDERS={'render': builder}) env['RECURSIVE_TEMPLATE'] = self.UNIT_TEMPLATE template_files = env.render([os.path.join(target_dir, '.timestamp')], []) test_files = [] for infile in self.files: test_file = env.Command( [os.path.join(target_dir, os.path.basename(infile))], [infile], action=Copy("$TARGET", "$SOURCE")) test_files.append(test_file) # Copy all headers into the unit test for _basename, infile in viewitems(headers): test_file = env.Command( [os.path.join(target_dir, os.path.basename(infile))], [infile], action=Copy("$TARGET", "$SOURCE")) test_files.append(test_file) all_files = template_files + test_files c_files = [str(x) for x in all_files if str(x).endswith('.c')] return c_files, all_files
def dev_init(env, platform): dev_create_template(env, ["main.c", "app_manifest.json"]) dev_initialize(env, False) env.Append( CPPDEFINES=["_POSIX_C_SOURCE"], CPPPATH=[ join(env.sysroot_dir, "usr", "include"), join("$PROJECT_DIR", "lib"), join("$PROJECT_DIR", "include") ], CFLAGS=[ "-O0", "-std=c11", "--sysroot=" + env.sysroot_dir, "-fno-omit-frame-pointer", "-fno-strict-aliasing", "-Wall", "-fno-exceptions", ], CXXFLAGS=[ "-O0", "-fno-rtti", "-fno-exceptions", "-fno-non-call-exceptions", "-fno-use-cxa-atexit", "-fno-threadsafe-statics", ], CCFLAGS=[env.cortex], LINKFLAGS=[ env.cortex, "--sysroot=" + env.sysroot_dir, "-B", env.toolchain_dir, "-nodefaultlibs", "-Wl,--no-undefined", ], LIBSOURCE_DIRS=[ join(env.framework_dir, platform, "libraries"), ], LIBPATH=[join("$PROJECT_DIR", "lib")], # -L LIBS=["c", "gcc_s", "applibs", "azureiot", "curl"], BUILDERS=dict(PackImage=Builder( action=env.VerboseAction(dev_image_pack, " "), suffix=".bin")), UPLOADCMD=dev_image_upload) dev_experimental_mode(env) libs = [] libs.append( env.BuildLibrary( join("$BUILD_DIR", "_custom"), join("$PROJECT_DIR", "lib"), )) #USER libs.append( env.BuildLibrary( join("$BUILD_DIR", "_user"), join(env.framework_dir, platform, "libraries"), )) env.Append(LIBS=libs)
def RegisterSnakeBuilders(self): thrift_cpp_action = Action('$THRIFTCCOM', '$THRIFTCCOMSTR') thrift_cpp_builder = Builder(action=thrift_cpp_action, emitter=_thrift_cpp_emitter, src_suffix='.thrift') thrift_php_action = Action('$THRIFTPHPCOM', '$THRIFTPHPCOMSTR') thrift_php_builder = Builder(action=thrift_php_action, emitter=_thrift_php_emitter, src_suffix='.thrift') thrift_py_action = Action('$THRIFTPYCOM', '$THRIFTPYCOMSTR') thrift_py_builder = Builder(action=thrift_py_action, emitter=_thrift_py_emitter, src_suffix='.thrift') return { 'ThriftCppLibrary': thrift_cpp_builder, 'ThriftPhpLibrary': thrift_php_builder, 'ThriftPyLibrary': thrift_py_builder }
def generate(env, **kw): """ Add 'Download' builder to the environment. Called by SCons internally. """ env['BUILDERS']['Download'] = Builder(action=Action( downloadAction, strfunction=strFunction, chdir=True), single_source=True, source_factory=Value)
def generate(env): ''' CheckAbi(target, source) env.CheckAbi(target, source) CheckAbis source to target ''' bldr = Builder(action=CommandGeneratorAction( generator=checkabi_generator, kw={'strfunction': checkabi_print})) env.Append(BUILDERS={'CheckAbi': bldr})
def generate(env): ''' Strip(target, source) env.Strip(target, source) Strips source to target ''' bldr = Builder(action=CommandGeneratorAction( generator=strip_generator, kw={'strfunction': strip_print})) env.Append(BUILDERS={'Strip': bldr})
def dev_init(env, platform): print("RASPBERRYPI PI PICO RP2040 BOOT STAGE 2 COMPILER") env.platform = platform env.framework_dir = env.PioPlatform().get_package_dir( "framework-wizio-pico") env.libs = libs = [] env.sdk = dev_sdk(env) dev_compiler(env) dev_create_template(env) env.Append(ASFLAGS=[env.cortex, "-x", "assembler-with-cpp"], CPPDEFINES=["PICO_FLASH_SPI_CLKDIV=2"], CPPPATH=[ join("$PROJECT_DIR", "include"), join(env.framework_dir, env.sdk, "include"), join(env.framework_dir, env.sdk, "boards"), join(env.framework_dir, env.sdk, "boot_stage2", "asminclude"), ], CFLAGS=[ env.cortex, "-Os", "-fdata-sections", "-ffunction-sections", "-Wall", "-Wfatal-errors", "-Wstrict-prototypes", ], LINKFLAGS=[ env.cortex, "-Os", "-nostartfiles", "-nostdlib", "-Wall", "-Wfatal-errors", "--entry=_stage2_boot" ], LDSCRIPT_PATH=[ join(env.framework_dir, env.sdk, "boot_stage2", "boot_stage2.ld") ], BUILDERS=dict(ElfToBin=Builder(action=env.VerboseAction( " ".join([ "$OBJCOPY", "-O", "binary", "$SOURCES", "$TARGET", ]), "Building $TARGET"), suffix=".bin")), UPLOADCMD=dev_create_asm) libs = [] env.Append(LIBS=libs) # Select file, Clean, Upload, Get boot2.S from build folder env.BuildSources(join("$BUILD_DIR", "BOOT2"), join(env.framework_dir, env.sdk, "boot_stage2"), src_filter="-<*> +<boot2_w25q080.S>") # is default
def dot_test(self): # print "calling profile",self if self._built: # print "has been built" return action = Action(self.build, "Dottest '%s' " % (self.act.__name__)) builder = Builder(action=action, emitter=self.emitter) builder(self.env, self.name) self._built = True
def generate(env): # JLOCAL_PROD is used to specify a production or baseline installation of # RAF tools, especially nimbus. It must be specified in a scons # variable, there is no default. The path is ignored if it is the same # as the JLOCAL install target, otherwise any tests which depend on # NIMBUS_PROD would then cause scons to install nimbus over top of the # production install. # env.Require('xvfb') jlocal_prod = None global _options if not _options: projdir = os.environ.get('PROJ_DIR') if not projdir: projdir = "$JLOCAL/projects" _options = env.GlobalVariables() _options.Add('JLOCAL_PROD', 'Path to production JLOCAL to use for test comparisons', jlocal_prod) _options.Add( 'PROJ_DIR', 'Set an explicit value for the PROJ_DIR ' 'environment variable.', projdir) _options.Update(env) jlocal_prod = env.get('JLOCAL_PROD') if not jlocal_prod: print( "JLOCAL_PROD not specified. Baseline comparisons not available.") else: nimbus_prod = env.File("$JLOCAL_PROD/bin/nimbus") env['NIMBUS_PROD'] = nimbus_prod # Make sure nc_compare can be found, but prefer the copy built inside # this source tree. nccmpdir = env.Dir("#/nc_utils/nc_compare").abspath env.PrependENVPath('PATH', [nccmpdir, env.subst("$JLOCAL/bin")]) ncd = Builder(action="ncdump -p 6 ${SOURCE} > ${TARGET}", suffix=".txt") env['BUILDERS']['NCDUMP'] = ncd env.AddMethod(BatchNIMBUS) env.AddMethod(FindAircraftRawData, "FindAircraftRawData") env.AddMethod(NimbusSetupInput) env.AddMethod(NimbusProdENV) env.AddMethod(CompareNimbusNetCDF) env.AddMethod(DiffNimbusNetCDF) env.AddMethod(SetProjDirENV) env.AddMethod(MakeNimbusSetup, "NimbusSetup") # Setup the environment with the default PROJ_DIR, but it can be # overridden, such as to test against different copies, by calling # SetProjDirENV() with a different path. The default is the value set by # the PROJ_DIR scons configuration variable. env.SetProjDirENV()
def generate(env): ''' Symbols(asm_source, symbols_file) env.Symbols(asm_source, symbols_file) Generates %.symbols.s file from %.symbols ''' bldr = Builder(action=CommandGeneratorAction( generator=symbols_generator, kw={'strfunction': symbols_print}), suffix='.symbols.s', src_suffixes='.symbols') env.Append(BUILDERS={'Symbols': bldr})
def generate(env): """ Add builders and construction variables for the DistTar builder. """ disttar_action = SCons.Action.Action(disttar, disttar_string) env['BUILDERS']['DistTar'] = Builder(action=disttar_action, emitter=disttar_emitter, suffix=disttar_suffix, target_factory=env.fs.Entry) env.AppendUnique(DISTTAR_FORMAT='gz')
def generate(env): ''' BinaryObj(binary_source, binary_file) env.BinaryObj(binary_source, binary_file) Generates %.binary.s file from %.binary ''' bldr = Builder(action = CommandGeneratorAction(generator = binary_generator, kw = {'strfunction': binary_print}), prefix = 'binary_', suffix = '.o') env.Append(BUILDERS = {'BinaryObj' : bldr})
def generate(env): """ RootCint(dictionary,headers[,PCMNAME=pcmfilename]) env.RootCint(dictionary,headers[,PCMNAME=pcmfilename]) Generate ROOT dictionary source file "dictionary" from list of class headers "headers" """ bld = Builder(action=Action(rootcint_builder, rootcint_print), emitter=rootcint_emitter) env.Append(BUILDERS={'RootCint': bld}) env.Replace(PCMNAME='')
def generate(env): ''' AbiSo(abi_so, symbols_obj) env.AbiSo(abi_so, symbols_obj) Generates %.abi.so file from %.symbols.o ''' bldr = Builder(action=CommandGeneratorAction( generator=abi_so_generator, kw={'strfunction': abi_so_print}), emitter=abi_so_emitter, suffix='.symbols.s', src_suffixes='.symbols') env.Append(BUILDERS={'LibAbiSo': bldr})
def generate(env): ''' Copy(target, source) env.Copy(target, source) Makes a copy just like standard Copy Command action named "link_name" that points to the real file or directory "source". The link produced is always relative. ''' bldr = Builder(action = Action(copy_builder,copy_print), single_target = True, single_source = True) env.Append(BUILDERS = {'Copy' : bldr})
def generate(env, **kw): """ Add 'Extract' builder to the environment. Called by SCons internally. """ env['BUILDERS']['Extract'] = Builder( action=Action( extractAction, strfunction=strFunction, ), emitter=emitter, target_factory=Dir, )