[llvm-commits] [hlvm] r38200 - in /hlvm/trunk: build/documentation.py build/hlvm.py docs/SConscript
Reid Spencer
reid at x10sys.com
Sat Jul 7 17:01:06 PDT 2007
Author: reid
Date: Sat Jul 7 19:01:06 2007
New Revision: 38200
URL: http://llvm.org/viewvc/llvm-project?rev=38200&view=rev
Log:
Fix the doxygen generator and make a doxy-install target to assist with
installing the doxygen in the public web site.
Modified:
hlvm/trunk/build/documentation.py
hlvm/trunk/build/hlvm.py
hlvm/trunk/docs/SConscript
Modified: hlvm/trunk/build/documentation.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/documentation.py?rev=38200&r1=38199&r2=38200&view=diff
==============================================================================
--- hlvm/trunk/build/documentation.py (original)
+++ hlvm/trunk/build/documentation.py Sat Jul 7 19:01:06 2007
@@ -1,5 +1,6 @@
from SCons.Environment import Environment as Environment
from SCons.Defaults import Mkdir
+from SCons.Defaults import Copy as Copy
import re,fileinput,os,glob
from string import join as sjoin
from os.path import join as pjoin
@@ -15,6 +16,9 @@
result.append(f)
return result
+def DoxygenMessage(target,source,env):
+ return "Creating API Documentation With Doxygen (be patient)"
+
def DoxygenAction(target,source,env):
if env['with_doxygen'] == None:
print "Documentation generation disabled because 'doxygen' was not found"
@@ -22,6 +26,9 @@
tgtdir = target[0].dir.path
srcpath = source[0].path
tgtpath = target[0].path
+ docsdir = target[0].dir.path
+ tarpath = pjoin(docsdir,'apis')
+
env.Depends(tgtpath,srcpath)
env.Depends(tgtpath,'doxygen.footer')
env.Depends(tgtpath,'doxygen.header')
@@ -31,20 +38,33 @@
env.Depends(tgtpath,f)
if 0 == env.Execute(env['with_doxygen'] + ' ' + srcpath + ' >' +
pjoin(tgtdir,'doxygen.out')):
- return env.Execute(env['TAR'] + ' zcf ' + tgtpath + ' ' +
- pjoin(tgtdir,'apis'))
+ return env.Execute(env['TAR'] + ' zcf ' + tgtpath + ' -C ' + tarpath +
+ ' html')
return 0
-def DoxygenMessage(target,source,env):
- return "Creating API Documentation With Doxygen (be patient)"
-
def Doxygen(env):
doxyAction = env.Action(DoxygenAction,DoxygenMessage)
doxygenBuilder = env.Builder(action=doxyAction)
env.Append(BUILDERS = {'Doxygen':doxygenBuilder} )
- env.Alias('doxygen','doxygen.tar.gz')
return 1
+def DoxygenInstallMessage(target,source,env):
+ return "Installing API Documentation Into Subversion"
+
+def DoxygenInstallAction(target,source,env):
+ tarfile = target[0].path
+ tgtdir = target[0].dir.path
+ srcpath = source[0].path
+ env.Execute(Copy(tarfile,srcpath))
+ env.Execute(env['TAR'] + ' zxf ' + tarfile + ' -C ' + tgtdir )
+ return 0
+
+def DoxygenInstall(env):
+ doxyInstAction = env.Action(DoxygenInstallAction,DoxygenInstallMessage)
+ doxyInstBuilder = env.Builder(action=doxyInstAction)
+ env.Append(BUILDERS = {'DoxygenInstall':doxyInstBuilder} )
+ return 1;
+
def XSLTMessage(target,source,env):
return "Creating " + target[0].path + " via XSLT from " + source[0].path
Modified: hlvm/trunk/build/hlvm.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/hlvm.py?rev=38200&r1=38199&r2=38200&view=diff
==============================================================================
--- hlvm/trunk/build/hlvm.py (original)
+++ hlvm/trunk/build/hlvm.py Sat Jul 7 19:01:06 2007
@@ -49,6 +49,10 @@
from build import documentation
return documentation.Doxygen(env)
+def GetDoxygenInstall(env):
+ from build import documentation
+ return documentation.DoxygenInstall(env)
+
def GetXSLTproc(env):
from build import documentation
return documentation.XSLTproc(env)
@@ -201,7 +205,7 @@
BuildDir = 'build.' + VariantName
env['Variant'] = VariantName
env['BuildDir'] = BuildDir
- env['AbsObjRoot'] = env.Dir(BuildDir).abspath
+ env['AbsObjRoot'] = env.Dir('#' + BuildDir).abspath
env['AbsSrcRoot'] = env.Dir('#').abspath
env.Prepend(CPPPATH=[pjoin('#',BuildDir)])
env.Prepend(CPPPATH=['#'])
Modified: hlvm/trunk/docs/SConscript
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/docs/SConscript?rev=38200&r1=38199&r2=38200&view=diff
==============================================================================
--- hlvm/trunk/docs/SConscript (original)
+++ hlvm/trunk/docs/SConscript Sat Jul 7 19:01:06 2007
@@ -21,11 +21,22 @@
#
#===----------------------------------------------------------------------===#
from build import hlvm
+from os.path import join as pjoin
Import('env')
if 'docs' in COMMAND_LINE_TARGETS:
hlvm.GetDoxygen(env)
- hlvm.GetXSLTproc(env)
hlvm.GetConfigFile(env)
+ hlvm.GetXSLTproc(env)
env.ConfigFile('Doxyfile','Doxyfile.in')
env.Doxygen('doxygen.tar.gz','Doxyfile')
env.XSLTproc('HLVM.rng.html',['RngToXHTML.xsl','#hlvm/Reader/HLVM.rng'])
+ env.Alias('docs','doxygen.tar.gz')
+ env.Alias('docs','HLVM.rng.html')
+
+if 'doxy-install' in COMMAND_LINE_TARGETS:
+ hlvm.GetDoxygenInstall(env)
+ installtgt = '/var/www/sites/hlvm/apis/doxygen.tar.gz'
+ installsrc = 'doxygen.tar.gz'
+ env.DoxygenInstall(installtgt,installsrc)
+ env.Alias('doxy-install',installtgt)
+
More information about the llvm-commits
mailing list