<s> """<STR_LIT>""" <EOL> from os . path import isfile , join <EOL> from SCons . Script import ( COMMAND_LINE_TARGETS , AlwaysBuild , Default , <EOL> DefaultEnvironment , SConscript ) <EOL> env = DefaultEnvironment ( ) <EOL> SConscript ( env . subst ( join ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) ) ) <EOL> if env . subst ( "<STR_LIT>" ) == "<STR_LIT>" : <EOL> if not isfile ( join ( env . subst ( "<STR_LIT>" ) , "<STR_LIT>" ) ) : <EOL> env . Exit ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> ) <EOL> env . Replace ( <EOL> UPLOADER = join ( <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" <EOL> ) , <EOL> UPLOADERFLAGS = [ <EOL> join ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> '<STR_LIT>' % join ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> ] , <EOL> UPLOADCMD = '<STR_LIT>' <EOL> ) <EOL> else : <EOL> env . Replace ( <EOL> UPLOADER = join ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) , <EOL> UPLOADERFLAGS = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] , <EOL> UPLOADCMD = '<STR_LIT>' <EOL> ) <EOL> env . Append ( <EOL> CPPDEFINES = [ <EOL> env . get ( "<STR_LIT>" , { } ) . get ( <EOL> "<STR_LIT>" , { } ) . get ( "<STR_LIT>" , "<STR_LIT>" ) . upper ( ) <EOL> ] , <EOL> LIBS = [ "<STR_LIT>" , "<STR_LIT>" ] , <EOL> LINKFLAGS = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> ) <EOL> target_elf = env . BuildProgram ( ) <EOL> if "<STR_LIT>" in COMMAND_LINE_TARGETS : <EOL> target_firm = join ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> else : <EOL> target_firm = env . ElfToBin ( join ( "<STR_LIT>" , "<STR_LIT>" ) , target_elf ) <EOL> target_size = env . Alias ( "<STR_LIT:size>" , target_elf , "<STR_LIT>" ) <EOL> AlwaysBuild ( target_size ) <EOL> if "<STR_LIT>" in env . subst ( "<STR_LIT>" ) and not env . subst ( "<STR_LIT>" ) : <EOL> upload = env . Alias ( [ "<STR_LIT>" , "<STR_LIT>" ] , <EOL> target_firm , env . UploadToDisk ) <EOL> else : <EOL> upload = env . Alias ( [ "<STR_LIT>" , "<STR_LIT>" ] , target_firm , "<STR_LIT>" ) <EOL> AlwaysBuild ( upload ) <EOL> Default ( [ target_firm , target_size ] ) </s>
