Changeset 560 for trunk/SConstruct

Show
Ignore:
Timestamp:
02/26/07 14:29:12 (2 years ago)
Author:
dirk
Message:

Added doxygen support (first round)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk

    • Property svn:ignore changed from
      config.log
      .sconf_temp_linux
      build.linux
      .sconsign.*
      sconf.log_*
      .sconf_temp*
      option.cache.*
      to
      .sconf_temp*
      .sconsign.*
      build.*
      config.log
      option.cache.*
      sconf.log_*
      *.pyc
  • trunk/SConstruct

    r555 r560  
    4040from LibraryUtils import * 
    4141from sets import Set 
     42from socket import gethostname 
    4243 
    4344# If we have pysvn, load it 
     
    457458        modifiedStr = "" 
    458459        for file in glob.glob("Doc/*"): 
    459             print file 
    460460            fileRev, fileMod = self._getSVNInfo(file) 
    461461             
     
    500500SourceSignatures('MD5') 
    501501#SourceSignatures('timestamp') 
    502 #SConsignFile('.sconsign.'+GetPlatform()) 
    503502opensg_version_string = file("VERSION").readline().strip() 
    504503 
     
    516515   # XXX: Temp hack to get msvs version setting 
    517516   if ARGUMENTS.has_key("MSVS_VERSION"): 
    518       common_env = Environment(MSVS_VERSION=ARGUMENTS["MSVS_VERSION"]) 
     517      common_env = Environment(MSVS_VERSION=ARGUMENTS["MSVS_VERSION"],  
     518                                tools = ['default', 'doxygen'],  
     519                                toolpath = '.') 
    519520   else: 
    520       common_env = Environment(
     521      common_env = Environment(tools = ['default', 'doxygen'], toolpath = '.'
    521522else: 
    522523   if ARGUMENTS.has_key("icc"): 
     
    527528          
    528529      common_env = Environment(ENV = os.environ, 
    529                                tools=['gnulink', 'intelicc', 'intelicpc'], 
    530                                cxxlib_icc=use_cxxlib_icc) 
     530                               tools=['gnulink', 'intelicc', 'intelicpc', 'doxygen'], 
     531                               cxxlib_icc=use_cxxlib_icc,  
     532                               toolpath = '.') 
    531533   else: 
    532       common_env = Environment(ENV = os.environ) 
     534      common_env = Environment(ENV = os.environ,  
     535                               toolpath = '.', 
     536                               tools = ['default', 'doxygen']) 
    533537 
    534538SConsignFile('.sconsign.'+GetPlatform()+common_env.subst('$CXX')) 
     
    703707    "enable_scanparse_regen", "Enable regenerating the scanner/parser files using flex and bison", False); 
    704708 
     709feature_options["docs_mode"] = sca_opts.EnumOption( 
     710    "docs_mode", "Select the mode for documentation generation", 
     711    "NONE", ["NONE", "STANDALONE", "TRAC"]) 
     712 
    705713if "win32" == platform: 
    706714    feature_options["enable_win_localstorage"] = sca_opts.BoolOption( 
     
    846854    
    847855   # Add lexer to the build 
    848    addScanParseSkel(common_env) 
    849  
     856   addScanParseSkel(common_env)       
     857       
    850858   # -- Common builder settings 
    851859   variant_helper.readOptions(common_env) 
     
    932940   # Revision tracking 
    933941   # For each library, find its Def.cpp file(s) and set the revision to the highest one found 
    934    # in the source tree. Recommended before building anyhting that's distributed (dailybuild, release etc.) 
     942   # in the source tree. Recommended before building anything that's distributed (dailybuild, release etc.) 
    935943   # This could go into scons-addons at some point... 
    936944   if common_env["enable_revision_tags"]: 
    937945      tagWriter = RevisionTagWriter(lib_map) 
    938946      tagWriter.run() 
     947       
     948   # Documentation 
     949   if "NONE" != common_env["docs_mode"]: 
     950      # Todo:  
     951      #   - put output into build dir 
     952      #   - handle different doc levels 
     953      #   - handle different output types 
     954 
     955      # Get all used source/header files 
     956      dox_inp = "" 
     957      for (name,lib) in lib_map.iteritems(): 
     958         for i in lib.source_files: 
     959            dox_inp += "../Source/" + i + " " 
     960         for i in lib.header_files: 
     961            dox_inp += "../Source/" + i + " " 
     962       
     963      # Need to use my private doxygen version until the parameter macro patch is in 
     964      if "dream.lite3d.com" == gethostname(): 
     965         common_env["DOXYGEN"] = "/home/reiners/software/DocumentationTools/doxygen-cvs/doxygen-070225/bin//doxygen" 
     966      common_env["DOX_INPUT"] = dox_inp 
     967      common_env["DOX_VERSION"] = opensg_version_string 
     968       
     969      if "STANDALONE" == common_env["docs_mode"]: 
     970         common_env.Doxygen("Doc/standalone.doxy") 
     971      elif "TRAC" == common_env["docs_mode"]: 
     972         common_env.Doxygen("Doc/trac.doxy") 
     973      else: 
     974         raise "Unknown docs_mode %s" % common_env["docs_mode"] 
    939975       
    940976   # ---- FOR EACH VARIANT ----- # 
     
    946982       
    947983   # We tread the first variant type special (auto link from libs here) 
    948    default_combo_type = variant_helper.variants["type"][0][0] 
    949     
     984   try: 
     985      default_combo_type = variant_helper.variants["type"][0][0] 
     986   except: 
     987      default_combo_type = None 
     988       
    950989   for combo in variant_helper.iterate(locals(), base_bldr, common_env): 
    951990      #baseEnv = env_bldr.applyToEnvironment(common_env.Copy(), variant=combo,options=opts) 
     
    9711010      for d in sub_dirs: 
    9721011         SConscript(pj(d, 'SConscript'), build_dir = pj(full_build_dir, d), duplicate = 0) 
    973           
     1012       
    9741013      # Build -config file based on first set installed 
    9751014      if 0 == variant_pass: