[llvm-commits] [hlvm] r38100 - in /hlvm/trunk/build: __init__.py doxygen.py environment.py

Reid Spencer reid at x10sys.com
Sat Jul 7 16:59:49 PDT 2007


Author: reid
Date: Sat Jul  7 18:59:49 2007
New Revision: 38100

URL: http://llvm.org/viewvc/llvm-project?rev=38100&view=rev
Log:
A little bit of cleanup.

Added:
    hlvm/trunk/build/doxygen.py
Removed:
    hlvm/trunk/build/environment.py
Modified:
    hlvm/trunk/build/__init__.py

Modified: hlvm/trunk/build/__init__.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/__init__.py?rev=38100&r1=38099&r2=38100&view=diff

==============================================================================
--- hlvm/trunk/build/__init__.py (original)
+++ hlvm/trunk/build/__init__.py Sat Jul  7 18:59:49 2007
@@ -1,6 +1,6 @@
 import os
 import glob
 import string
-__all__ = ["configure","default","environment"]
+__all__ = ["hlvm","check","configure","doxygen","filterbuilders"]
 __version__ = "0.1"
 __developer__ = "reid"

Added: hlvm/trunk/build/doxygen.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/doxygen.py?rev=38100&view=auto

==============================================================================
--- hlvm/trunk/build/doxygen.py (added)
+++ hlvm/trunk/build/doxygen.py Sat Jul  7 18:59:49 2007
@@ -0,0 +1,71 @@
+from SCons.Environment import Environment as Environment
+from SCons.Defaults import Mkdir
+import re,fileinput,os,glob
+from string import join as sjoin
+from os.path import join as pjoin
+from os.path import exists
+
+def getHeaders(env):
+  context = pjoin(env['AbsSrcRoot'],'hlvm')
+  result = []
+  for d in glob.glob(pjoin(context,'*.h')):
+    if not os.path.isdir(d):
+      if not d == pjoin(context,'dg.exp'):
+        result.append(d)
+  return result
+
+def SiteExpAction(target,source,env):
+  srcpath = pjoin(env['AbsSrcRoot'],'docs')
+  objpath = pjoin(env['AbsObjRoot'],'docs')
+  if not exists(objpath):
+    env.Execute(Mkdir(objpath))
+  if not exists(pjoin(objpath,'Doxyfile'):
+
+  env.Execute(Copy(pjoin(srcpath,'doxygen.css'),pjoin(objpath,'doxygen.css')))
+
+	$(Echo) "Running Doxygen (be patient)"
+	$(Verb) cp $(PROJ_SRC_DIR)/doxygen.css doxygen.css
+	$(Verb) doxygen Doxyfile >doxygen.out 2>&1
+	$(Verb) cp $(PROJ_SRC_DIR)/doxygen.css apis/html
+  outf = open(pjoin(tgtpath,'site.exp'),"w")
+  outf.write('## these variables are automatically generated by make ##\n')
+  outf.write('# Do not edit here.  If you wish to override these values\n')
+  outf.write('# edit the last section\n')
+  outf.write('set target_triplet "fubar-pc-noos"\n')
+  outf.write('set srcdir "' + env['AbsSrcRoot'] + '/test"\n')
+  outf.write('set objdir "' + env['AbsObjRoot'] + '/test"\n')
+  outf.write('set tmpdir "$objdir/tmp"\n')
+  outf.write('set srcrootdir "' + env['AbsSrcRoot'] + '"\n')
+  outf.write('set objrootdir "' + env['AbsObjRoot'] + '"\n')
+  outf.write('## All vars above are generated by scons. Do Not Edit!\n')
+  outf.close()
+  return 0
+
+def SiteExpMessage(target,source,env):
+  return "Building DejaGnu site.exp file"
+
+def DoxygenAction(target,source,env):
+  context = os.path.basename(env.File(target[0]).path)
+  context = re.sub('(.*?)\..*','\\1',context)
+  print "context=",context
+  os.system('cd ' + pjoin(env['BuildDir'],'test') +
+      '; DEJAGNU="'+pjoin(env['AbsObjRoot'],'test','site.exp')+'" '+
+      env['RUNTEST'] + ' --tool ' + context)
+  return 0
+
+def DoxygenMessage(target,source,env):
+  return "Creating API Documentation With Doxygen (be patient)"
+
+def Doxygen(env):
+  if env['DOXYGEN'] == None:
+    print "Documentation generation disabled because 'doxygen' was not found"
+    return 0
+  doxyAction = env.Action(DoxygenAction,DoxygenMessage)
+  doxygenBuilder = env.Builder(action=doxyAction)
+  env.Append(BUILDERS = {'Check':checkBuilder,'SiteExp':sitexpBuilder})
+  env.Doxygen('#docs/doxygen.tar.gz','#docs/Doxyfile','#docs/doxygen.css',
+    '#docs/doxygen.header','#docs/doxygen.footer','#docs/doxygen.intro']+
+    getHeaders(env))
+  env.Alias('doxygen','#docs/doxygen.tar.gz')
+  return 1
+

Removed: hlvm/trunk/build/environment.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/environment.py?rev=38099&view=auto

==============================================================================
--- hlvm/trunk/build/environment.py (original)
+++ hlvm/trunk/build/environment.py (removed)
@@ -1,4 +0,0 @@
-# HLVM scons Software Construction Specification
-# 
-
-# Import stuff we need from SCons package





More information about the llvm-commits mailing list