"""SCons.ToolSCons tool selection.This looks for modules that define a callable object that can modifya construction environment as appropriate for a given tool (or toolchain).Note that because this subsystem just *selects* a callable that canmodify a construction environment, it's possible for people to definetheir own "tool specification" in an arbitrary callable function. Noone needs to use or tie in to this subsystem in order to roll their owntool definition."""## __COPYRIGHT__## Permission is hereby granted, free of charge, to any person obtaining# a copy of this software and associated documentation files (the# "Software"), to deal in the Software without restriction, including# without limitation the rights to use, copy, modify, merge, publish,# distribute, sublicense, and/or sell copies of the Software, and to# permit persons to whom the Software is furnished to do so, subject to# the following conditions:## The above copyright notice and this permission notice shall be included# in all copies or substantial portions of the Software.## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.__revision__="__FILE__ __REVISION__ __DATE__ __DEVELOPER__"importimpimportsysimportreimportosimportshutilimportSCons.BuilderimportSCons.ErrorsimportSCons.Node.FSimportSCons.ScannerimportSCons.Scanner.CimportSCons.Scanner.DimportSCons.Scanner.LaTeXimportSCons.Scanner.ProgDefaultToolpath=[]CScanner=SCons.Scanner.C.CScanner()DScanner=SCons.Scanner.D.DScanner()LaTeXScanner=SCons.Scanner.LaTeX.LaTeXScanner()PDFLaTeXScanner=SCons.Scanner.LaTeX.PDFLaTeXScanner()ProgramScanner=SCons.Scanner.Prog.ProgramScanner()SourceFileScanner=SCons.Scanner.Base({},name='SourceFileScanner')CSuffixes=[".c",".C",".cxx",".cpp",".c++",".cc",".h",".H",".hxx",".hpp",".hh",".F",".fpp",".FPP",".m",".mm",".S",".spp",".SPP",".sx"]DSuffixes=['.d']IDLSuffixes=[".idl",".IDL"]LaTeXSuffixes=[".tex",".ltx",".latex"]forsuffixinCSuffixes:SourceFileScanner.add_scanner(suffix,CScanner)forsuffixinDSuffixes:SourceFileScanner.add_scanner(suffix,DScanner)# FIXME: what should be done here? Two scanners scan the same extensions,# but look for different files, e.g., "picture.eps" vs. "picture.pdf".# The builders for DVI and PDF explicitly reference their scanners# I think that means this is not needed???forsuffixinLaTeXSuffixes:SourceFileScanner.add_scanner(suffix,LaTeXScanner)SourceFileScanner.add_scanner(suffix,PDFLaTeXScanner)classTool(object):def__init__(self,name,toolpath=[],**kw):self.name=nameself.toolpath=toolpath+DefaultToolpath# remember these so we can merge them into the callself.init_kw=kwmodule=self._tool_module()self.generate=module.generateself.exists=module.existsifhasattr(module,'options'):self.options=module.optionsdef_tool_module(self):# TODO: Interchange zipimport with normal initilization for better error reportingoldpythonpath=sys.pathsys.path=self.toolpath+sys.pathtry:try:file,path,desc=imp.find_module(self.name,self.toolpath)try:returnimp.load_module(self.name,file,path,desc)finally:iffile:file.close()exceptImportError,e:ifstr(e)!="No module named %s"%self.name:raiseSCons.Errors.EnvironmentError(e)try:importzipimportexceptImportError:passelse:foraPathinself.toolpath:try:importer=zipimport.zipimporter(aPath)returnimporter.load_module(self.name)exceptImportError,e:passfinally:sys.path=oldpythonpathfull_name='SCons.Tool.'+self.nametry:returnsys.modules[full_name]exceptKeyError:try:smpath=sys.modules['SCons.Tool'].__path__try:file,path,desc=imp.find_module(self.name,smpath)module=imp.load_module(full_name,file,path,desc)setattr(SCons.Tool,self.name,module)iffile:file.close()returnmoduleexceptImportError,e:ifstr(e)!="No module named %s"%self.name:raiseSCons.Errors.EnvironmentError(e)try:importzipimportimporter=zipimport.zipimporter(sys.modules['SCons.Tool'].__path__[0])module=importer.load_module(full_name)setattr(SCons.Tool,self.name,module)returnmoduleexceptImportError,e:m="No tool named '%s': %s"%(self.name,e)raiseSCons.Errors.EnvironmentError(m)exceptImportError,e:m="No tool named '%s': %s"%(self.name,e)raiseSCons.Errors.EnvironmentError(m)def__call__(self,env,*args,**kw):ifself.init_kwisnotNone:# Merge call kws into init kws;# but don't bash self.init_kw.ifkwisnotNone:call_kw=kwkw=self.init_kw.copy()kw.update(call_kw)else:kw=self.init_kwenv.Append(TOOLS=[self.name])ifhasattr(self,'options'):importSCons.Variablesif'options'notinenv:fromSCons.ScriptimportARGUMENTSenv['options']=SCons.Variables.Variables(args=ARGUMENTS)opts=env['options']self.options(opts)opts.Update(env)self.generate(env,*args,**kw)def__str__(self):returnself.name########################################################################### Create common executable program / library / object buildersdefcreateProgBuilder(env):"""This is a utility function that creates the Program Builder in an Environment if it is not there already. If it is already there, we return the existing one. """try:program=env['BUILDERS']['Program']exceptKeyError:importSCons.Defaultsprogram=SCons.Builder.Builder(action=SCons.Defaults.LinkAction,emitter='$PROGEMITTER',prefix='$PROGPREFIX',suffix='$PROGSUFFIX',src_suffix='$OBJSUFFIX',src_builder='Object',target_scanner=ProgramScanner)env['BUILDERS']['Program']=programreturnprogramdefcreateStaticLibBuilder(env):"""This is a utility function that creates the StaticLibrary Builder in an Environment if it is not there already. If it is already there, we return the existing one. """try:static_lib=env['BUILDERS']['StaticLibrary']exceptKeyError:action_list=[SCons.Action.Action("$ARCOM","$ARCOMSTR")]ifenv.Detect('ranlib'):ranlib_action=SCons.Action.Action("$RANLIBCOM","$RANLIBCOMSTR")action_list.append(ranlib_action)static_lib=SCons.Builder.Builder(action=action_list,emitter='$LIBEMITTER',prefix='$LIBPREFIX',suffix='$LIBSUFFIX',src_suffix='$OBJSUFFIX',src_builder='StaticObject')env['BUILDERS']['StaticLibrary']=static_libenv['BUILDERS']['Library']=static_libreturnstatic_libdefVersionShLibLinkNames(version,libname,env):"""Generate names of symlinks to the versioned shared library"""Verbose=Falseplatform=env.subst('$PLATFORM')shlib_suffix=env.subst('$SHLIBSUFFIX')shlink_flags=SCons.Util.CLVar(env.subst('$SHLINKFLAGS'))linknames=[]ifversion.count(".")!=2:# We need a version string of the form x.y.z to proceed# Several changes need to be made to support versions like x.yraiseValueErrorifplatform=='darwin':# For libfoo.x.y.z.dylib, linknames libfoo.sosuffix_re=re.escape('.'+version+shlib_suffix)linkname=re.sub(suffix_re,shlib_suffix,libname)ifVerbose:print"VersionShLibLinkNames: linkname = ",linknamelinknames.append(linkname)elifplatform=='posix':# For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.xsuffix_re=re.escape(shlib_suffix+'.'+version)# First linkname has no version numberlinkname=re.sub(suffix_re,shlib_suffix,libname)ifVerbose:print"VersionShLibLinkNames: linkname = ",linknamelinknames.append(linkname)versionparts=version.split('.')major_name=linkname+"."+versionparts[0]minor_name=major_name+"."+versionparts[1]#Only add link for major_name#for linkname in [major_name, minor_name]:forlinknamein[major_name,]:ifVerbose:print"VersionShLibLinkNames: linkname ",linkname,", target ",libnamelinknames.append(linkname)# note: no Windows case here (win32 or cygwin);# MSVC doesn't support this type of versioned shared libs.# (could probably do something for MinGW though)returnlinknamesdefVersionedSharedLibrary(target=None,source=None,env=None):"""Build a shared library. If the environment has SHLIBVERSIONdefined make a versioned shared library and create the appropriatesymlinks for the platform we are on"""Verbose=Falsetry:version=env.subst('$SHLIBVERSION')exceptKeyError:version=None# libname includes the version number if one was givenlibname=target[0].nameplatform=env.subst('$PLATFORM')shlib_suffix=env.subst('$SHLIBSUFFIX')shlink_flags=SCons.Util.CLVar(env.subst('$SHLINKFLAGS'))ifVerbose:print"VersionShLib: libname = ",libnameprint"VersionShLib: platform = ",platformprint"VersionShLib: shlib_suffix = ",shlib_suffixprint"VersionShLib: target = ",str(target[0])ifversion:# set the shared library link flagsifplatform=='posix':suffix_re=re.escape(shlib_suffix+'.'+version)(major,age,revision)=version.split(".")# soname will have only the major version number in itsoname=re.sub(suffix_re,shlib_suffix,libname)+'.'+majorshlink_flags+=['-Wl,-Bsymbolic','-Wl,-soname=%s'%soname]ifVerbose:print" soname ",soname,", shlink_flags ",shlink_flagselifplatform=='cygwin':shlink_flags+=['-Wl,-Bsymbolic','-Wl,--out-implib,${TARGET.base}.a']elifplatform=='darwin':shlink_flags+=['-current_version','%s'%version,'-compatibility_version','%s'%version,'-undefined','dynamic_lookup']ifVerbose:print"VersionShLib: shlink_flags = ",shlink_flagsenvlink=env.Clone()envlink['SHLINKFLAGS']=shlink_flagselse:envlink=envresult=SCons.Defaults.ShLinkAction(target,source,envlink)ifversion:# here we need the full pathname so the links end up in the right directorylibname=target[0].pathlinknames=VersionShLibLinkNames(version,libname,env)ifVerbose:print"VerShLib: linknames ",linknames# Here we just need the file name w/o path as the target of the linklib_ver=target[0].name# make symlink of adjacent names in linknamesforcountinrange(len(linknames)):linkname=linknames[count]ifcount>0:os.symlink(os.path.basename(linkname),lastname)ifVerbose:print"VerShLib: made sym link of %s -> %s"%(lastname,linkname)lastname=linkname# finish chain of sym links with link to the actual libraryiflen(linknames)>0:os.symlink(lib_ver,lastname)ifVerbose:print"VerShLib: made sym link of %s -> %s"%(lib_ver,linkname)returnresultShLibAction=SCons.Action.Action(VersionedSharedLibrary,None)defcreateSharedLibBuilder(env):"""This is a utility function that creates the SharedLibrary Builder in an Environment if it is not there already. If it is already there, we return the existing one. """try:shared_lib=env['BUILDERS']['SharedLibrary']exceptKeyError:importSCons.Defaultsaction_list=[SCons.Defaults.SharedCheck,ShLibAction]shared_lib=SCons.Builder.Builder(action=action_list,emitter="$SHLIBEMITTER",prefix='$SHLIBPREFIX',suffix='$SHLIBSUFFIX',target_scanner=ProgramScanner,src_suffix='$SHOBJSUFFIX',src_builder='SharedObject')env['BUILDERS']['SharedLibrary']=shared_libreturnshared_libdefcreateLoadableModuleBuilder(env):"""This is a utility function that creates the LoadableModule Builder in an Environment if it is not there already. If it is already there, we return the existing one. """try:ld_module=env['BUILDERS']['LoadableModule']exceptKeyError:importSCons.Defaultsaction_list=[SCons.Defaults.SharedCheck,SCons.Defaults.LdModuleLinkAction]ld_module=SCons.Builder.Builder(action=action_list,emitter="$LDMODULEEMITTER",prefix='$LDMODULEPREFIX',suffix='$LDMODULESUFFIX',target_scanner=ProgramScanner,src_suffix='$SHOBJSUFFIX',src_builder='SharedObject')env['BUILDERS']['LoadableModule']=ld_modulereturnld_moduledefcreateObjBuilders(env):"""This is a utility function that creates the StaticObject and SharedObject Builders in an Environment if they are not there already. If they are there already, we return the existing ones. This is a separate function because soooo many Tools use this functionality. The return is a 2-tuple of (StaticObject, SharedObject) """try:static_obj=env['BUILDERS']['StaticObject']exceptKeyError:static_obj=SCons.Builder.Builder(action={},emitter={},prefix='$OBJPREFIX',suffix='$OBJSUFFIX',src_builder=['CFile','CXXFile'],source_scanner=SourceFileScanner,single_source=1)env['BUILDERS']['StaticObject']=static_objenv['BUILDERS']['Object']=static_objtry:shared_obj=env['BUILDERS']['SharedObject']exceptKeyError:shared_obj=SCons.Builder.Builder(action={},emitter={},prefix='$SHOBJPREFIX',suffix='$SHOBJSUFFIX',src_builder=['CFile','CXXFile'],source_scanner=SourceFileScanner,single_source=1)env['BUILDERS']['SharedObject']=shared_objreturn(static_obj,shared_obj)defcreateCFileBuilders(env):"""This is a utility function that creates the CFile/CXXFile Builders in an Environment if they are not there already. If they are there already, we return the existing ones. This is a separate function because soooo many Tools use this functionality. The return is a 2-tuple of (CFile, CXXFile) """try:c_file=env['BUILDERS']['CFile']exceptKeyError:c_file=SCons.Builder.Builder(action={},emitter={},suffix={None:'$CFILESUFFIX'})env['BUILDERS']['CFile']=c_fileenv.SetDefault(CFILESUFFIX='.c')try:cxx_file=env['BUILDERS']['CXXFile']exceptKeyError:cxx_file=SCons.Builder.Builder(action={},emitter={},suffix={None:'$CXXFILESUFFIX'})env['BUILDERS']['CXXFile']=cxx_fileenv.SetDefault(CXXFILESUFFIX='.cc')return(c_file,cxx_file)########################################################################### Create common Java buildersdefCreateJarBuilder(env):try:java_jar=env['BUILDERS']['Jar']exceptKeyError:fs=SCons.Node.FS.get_default_fs()jar_com=SCons.Action.Action('$JARCOM','$JARCOMSTR')java_jar=SCons.Builder.Builder(action=jar_com,suffix='$JARSUFFIX',src_suffix='$JAVACLASSSUFIX',src_builder='JavaClassFile',source_factory=fs.Entry)env['BUILDERS']['Jar']=java_jarreturnjava_jardefCreateJavaHBuilder(env):try:java_javah=env['BUILDERS']['JavaH']exceptKeyError:fs=SCons.Node.FS.get_default_fs()java_javah_com=SCons.Action.Action('$JAVAHCOM','$JAVAHCOMSTR')java_javah=SCons.Builder.Builder(action=java_javah_com,src_suffix='$JAVACLASSSUFFIX',target_factory=fs.Entry,source_factory=fs.File,src_builder='JavaClassFile')env['BUILDERS']['JavaH']=java_javahreturnjava_javahdefCreateJavaClassFileBuilder(env):try:java_class_file=env['BUILDERS']['JavaClassFile']exceptKeyError:fs=SCons.Node.FS.get_default_fs()javac_com=SCons.Action.Action('$JAVACCOM','$JAVACCOMSTR')java_class_file=SCons.Builder.Builder(action=javac_com,emitter={},#suffix = '$JAVACLASSSUFFIX',src_suffix='$JAVASUFFIX',src_builder=['JavaFile'],target_factory=fs.Entry,source_factory=fs.File)env['BUILDERS']['JavaClassFile']=java_class_filereturnjava_class_filedefCreateJavaClassDirBuilder(env):try:java_class_dir=env['BUILDERS']['JavaClassDir']exceptKeyError:fs=SCons.Node.FS.get_default_fs()javac_com=SCons.Action.Action('$JAVACCOM','$JAVACCOMSTR')java_class_dir=SCons.Builder.Builder(action=javac_com,emitter={},target_factory=fs.Dir,source_factory=fs.Dir)env['BUILDERS']['JavaClassDir']=java_class_dirreturnjava_class_dirdefCreateJavaFileBuilder(env):try:java_file=env['BUILDERS']['JavaFile']exceptKeyError:java_file=SCons.Builder.Builder(action={},emitter={},suffix={None:'$JAVASUFFIX'})env['BUILDERS']['JavaFile']=java_fileenv['JAVASUFFIX']='.java'returnjava_fileclassToolInitializerMethod(object):""" This is added to a construction environment in place of a method(s) normally called for a Builder (env.Object, env.StaticObject, etc.). When called, it has its associated ToolInitializer object search the specified list of tools and apply the first one that exists to the construction environment. It then calls whatever builder was (presumably) added to the construction environment in place of this particular instance. """def__init__(self,name,initializer):""" Note: we store the tool name as __name__ so it can be used by the class that attaches this to a construction environment. """self.__name__=nameself.initializer=initializerdefget_builder(self,env):""" Returns the appropriate real Builder for this method name after having the associated ToolInitializer object apply the appropriate Tool module. """builder=getattr(env,self.__name__)self.initializer.apply_tools(env)builder=getattr(env,self.__name__)ifbuilderisself:# There was no Builder added, which means no valid Tool# for this name was found (or possibly there's a mismatch# between the name we were called by and the Builder name# added by the Tool module).returnNoneself.initializer.remove_methods(env)returnbuilderdef__call__(self,env,*args,**kw):""" """builder=self.get_builder(env)ifbuilderisNone:return[],[]returnbuilder(*args,**kw)classToolInitializer(object):""" A class for delayed initialization of Tools modules. Instances of this class associate a list of Tool modules with a list of Builder method names that will be added by those Tool modules. As part of instantiating this object for a particular construction environment, we also add the appropriate ToolInitializerMethod objects for the various Builder methods that we want to use to delay Tool searches until necessary. """def__init__(self,env,tools,names):ifnotSCons.Util.is_List(tools):tools=[tools]ifnotSCons.Util.is_List(names):names=[names]self.env=envself.tools=toolsself.names=namesself.methods={}fornameinnames:method=ToolInitializerMethod(name,self)self.methods[name]=methodenv.AddMethod(method)defremove_methods(self,env):""" Removes the methods that were added by the tool initialization so we no longer copy and re-bind them when the construction environment gets cloned. """formethodinself.methods.values():env.RemoveMethod(method)defapply_tools(self,env):""" Searches the list of associated Tool modules for one that exists, and applies that to the construction environment. """fortinself.tools:tool=SCons.Tool.Tool(t)iftool.exists(env):env.Tool(tool)return# If we fall through here, there was no tool module found.# This is where we can put an informative error message# about the inability to find the tool. We'll start doing# this as we cut over more pre-defined Builder+Tools to use# the ToolInitializer class.defInitializers(env):ToolInitializer(env,['install'],['_InternalInstall','_InternalInstallAs','_InternalInstallVersionedLib'])defInstall(self,*args,**kw):returnself._InternalInstall(*args,**kw)defInstallAs(self,*args,**kw):returnself._InternalInstallAs(*args,**kw)defInstallVersionedLib(self,*args,**kw):returnself._InternalInstallVersionedLib(*args,**kw)env.AddMethod(Install)env.AddMethod(InstallAs)env.AddMethod(InstallVersionedLib)defFindTool(tools,env):fortoolintools:t=Tool(tool)ift.exists(env):returntoolreturnNonedefFindAllTools(tools,env):defToolExists(tool,env=env):returnTool(tool).exists(env)returnlist(filter(ToolExists,tools))deftool_list(platform,env):other_plat_tools=[]# XXX this logic about what tool to prefer on which platform# should be moved into either the platform files or# the tool files themselves.# The search orders here are described in the man page. If you# change these search orders, update the man page as well.ifstr(platform)=='win32':"prefer Microsoft tools on Windows"linkers=['mslink','gnulink','ilink','linkloc','ilink32']c_compilers=['msvc','mingw','gcc','intelc','icl','icc','cc','bcc32']cxx_compilers=['msvc','intelc','icc','g++','c++','bcc32']assemblers=['masm','nasm','gas','386asm']fortran_compilers=['gfortran','g77','ifl','cvf','f95','f90','fortran']ars=['mslib','ar','tlib']other_plat_tools=['msvs','midl']elifstr(platform)=='os2':"prefer IBM tools on OS/2"linkers=['ilink','gnulink',]#'mslink']c_compilers=['icc','gcc',]# 'msvc', 'cc']cxx_compilers=['icc','g++',]# 'msvc', 'c++']assemblers=['nasm',]# 'masm', 'gas']fortran_compilers=['ifl','g77']ars=['ar',]# 'mslib']elifstr(platform)=='irix':"prefer MIPSPro on IRIX"linkers=['sgilink','gnulink']c_compilers=['sgicc','gcc','cc']cxx_compilers=['sgic++','g++','c++']assemblers=['as','gas']fortran_compilers=['f95','f90','f77','g77','fortran']ars=['sgiar']elifstr(platform)=='sunos':"prefer Forte tools on SunOS"linkers=['sunlink','gnulink']c_compilers=['suncc','gcc','cc']cxx_compilers=['sunc++','g++','c++']assemblers=['as','gas']fortran_compilers=['sunf95','sunf90','sunf77','f95','f90','f77','gfortran','g77','fortran']ars=['sunar']elifstr(platform)=='hpux':"prefer aCC tools on HP-UX"linkers=['hplink','gnulink']c_compilers=['hpcc','gcc','cc']cxx_compilers=['hpc++','g++','c++']assemblers=['as','gas']fortran_compilers=['f95','f90','f77','g77','fortran']ars=['ar']elifstr(platform)=='aix':"prefer AIX Visual Age tools on AIX"linkers=['aixlink','gnulink']c_compilers=['aixcc','gcc','cc']cxx_compilers=['aixc++','g++','c++']assemblers=['as','gas']fortran_compilers=['f95','f90','aixf77','g77','fortran']ars=['ar']elifstr(platform)=='darwin':"prefer GNU tools on Mac OS X, except for some linkers and IBM tools"linkers=['applelink','gnulink']c_compilers=['gcc','cc']cxx_compilers=['g++','c++']assemblers=['as']fortran_compilers=['gfortran','f95','f90','g77']ars=['ar']else:"prefer GNU tools on all other platforms"linkers=['gnulink','mslink','ilink']c_compilers=['gcc','msvc','intelc','icc','cc']cxx_compilers=['g++','msvc','intelc','icc','c++']assemblers=['gas','nasm','masm']fortran_compilers=['gfortran','g77','ifort','ifl','f95','f90','f77']ars=['ar','mslib']c_compiler=FindTool(c_compilers,env)orc_compilers[0]# XXX this logic about what tool provides what should somehow be# moved into the tool files themselves.ifc_compilerandc_compiler=='mingw':# MinGW contains a linker, C compiler, C++ compiler,# Fortran compiler, archiver and assembler:cxx_compiler=Nonelinker=Noneassembler=Nonefortran_compiler=Nonear=Noneelse:# Don't use g++ if the C compiler has built-in C++ support:ifc_compilerin('msvc','intelc','icc'):cxx_compiler=Noneelse:cxx_compiler=FindTool(cxx_compilers,env)orcxx_compilers[0]linker=FindTool(linkers,env)orlinkers[0]assembler=FindTool(assemblers,env)orassemblers[0]fortran_compiler=FindTool(fortran_compilers,env)orfortran_compilers[0]ar=FindTool(ars,env)orars[0]other_tools=FindAllTools(other_plat_tools+['dmd',#TODO: merge 'install' into 'filesystem' and# make 'filesystem' the default'filesystem','m4','wix',#'midl', 'msvs',# Parser generators'lex','yacc',# Foreign function interface'rpcgen','swig',# Java'jar','javac','javah','rmic',# TeX'dvipdf','dvips','gs','tex','latex','pdflatex','pdftex',# Archivers'tar','zip','rpm',# SourceCode factories'BitKeeper','CVS','Perforce','RCS','SCCS',# 'Subversion',],env)tools=([linker,c_compiler,cxx_compiler,fortran_compiler,assembler,ar]+other_tools)return[xforxintoolsifx]# Local Variables:# tab-width:4# indent-tabs-mode:nil# End:# vim: set expandtab tabstop=4 shiftwidth=4: