[llvm-commits] [hlvm] r38185 - in /hlvm/trunk: build/documentation.py build/doxygen.py build/hlvm.py docs/SConscript hlvm/Pass/ResolveTypes.h
Reid Spencer
reid at x10sys.com
Sat Jul 7 17:00:55 PDT 2007
Author: reid
Date: Sat Jul 7 19:00:55 2007
New Revision: 38185
URL: http://llvm.org/viewvc/llvm-project?rev=38185&view=rev
Log:
Incorporate XSLT and Doxygen builders into "documentation" module.
Added:
hlvm/trunk/build/documentation.py
- copied, changed from r38184, hlvm/trunk/build/doxygen.py
Removed:
hlvm/trunk/build/doxygen.py
Modified:
hlvm/trunk/build/hlvm.py
hlvm/trunk/docs/SConscript
hlvm/trunk/hlvm/Pass/ResolveTypes.h
Copied: hlvm/trunk/build/documentation.py (from r38184, hlvm/trunk/build/doxygen.py)
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/documentation.py?p2=hlvm/trunk/build/documentation.py&p1=hlvm/trunk/build/doxygen.py&r1=38184&r2=38185&rev=38185&view=diff
==============================================================================
--- hlvm/trunk/build/doxygen.py (original)
+++ hlvm/trunk/build/documentation.py Sat Jul 7 19:00:55 2007
@@ -41,3 +41,15 @@
env.Append(BUILDERS = {'Doxygen':doxygenBuilder} )
env.Alias('doxygen','doxygen.tar.gz')
return 1
+
+def XSLTMessage(target,source,env):
+ return "Creating " + target[0].path + " via XSLT from " + source[0].path
+
+def XSLTAction(target,source,env):
+ env.Execute( env['with_xsltproc'] + ' ' + source[0].path + ' ' +
+ source[1].path + ' >' + target[0].path )
+
+def XSLTproc(env):
+ xsltAction = env.Action(XSLTAction,XSLTMessage)
+ xsltBuilder = env.Builder(action=xsltAction)
+ env.Append(BUILDERS = {'XSLTproc':xsltBuilder} )
Removed: hlvm/trunk/build/doxygen.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/doxygen.py?rev=38184&view=auto
==============================================================================
--- hlvm/trunk/build/doxygen.py (original)
+++ hlvm/trunk/build/doxygen.py (removed)
@@ -1,43 +0,0 @@
-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):
- result.append(d)
- return result
-
-def DoxygenAction(target,source,env):
- if env['with_doxygen'] == None:
- print "Documentation generation disabled because 'doxygen' was not found"
- return 0
- tgtdir = target[0].dir.path
- srcpath = source[0].path
- tgtpath = target[0].path
- env.Depends(tgtpath,srcpath)
- env.Depends(tgtpath,'doxygen.footer')
- env.Depends(tgtpath,'doxygen.header')
- env.Depends(tgtpath,'doxygen.intro')
- env.Depends(tgtpath,'doxygen.css')
- env.Depends(tgtpath,getHeaders(env))
- if env.Execute(env['with_doxygen'] + ' ' + srcpath + ' >' +
- pjoin(tgtdir,'doxygen.out')):
- return env.Execute(env['TAR'] + ' zcf ' + tgtpath + ' ' +
- pjoin(tgtdir,'apis'))
- 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
Modified: hlvm/trunk/build/hlvm.py
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/build/hlvm.py?rev=38185&r1=38184&r2=38185&view=diff
==============================================================================
--- hlvm/trunk/build/hlvm.py (original)
+++ hlvm/trunk/build/hlvm.py Sat Jul 7 19:00:55 2007
@@ -46,8 +46,12 @@
return filterbuilders.ConfigFile(env)
def GetDoxygen(env):
- from build import doxygen
- return doxygen.Doxygen(env)
+ from build import documentation
+ return documentation.Doxygen(env)
+
+def GetXSLTproc(env):
+ from build import documentation
+ return documentation.XSLTproc(env)
def Dirs(env,dirlist=[]):
dir = env.Dir('.').path
Modified: hlvm/trunk/docs/SConscript
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/docs/SConscript?rev=38185&r1=38184&r2=38185&view=diff
==============================================================================
--- hlvm/trunk/docs/SConscript (original)
+++ hlvm/trunk/docs/SConscript Sat Jul 7 19:00:55 2007
@@ -24,14 +24,9 @@
from os.path import join as pjoin
Import('env')
hlvm.GetDoxygen(env)
+hlvm.GetXSLTproc(env)
hlvm.GetConfigFile(env)
env.ConfigFile('Doxyfile','Doxyfile.in')
+env.Doxygen('doxygen.tar.gz','Doxyfile')
+env.XSLTproc('HLVM.rng.html',['RngToXHTML.xsl','#hlvm/Reader/HLVM.rng'])
-if 'doxygen' in COMMAND_LINE_TARGETS:
- env.Doxygen('doxygen.tar.gz','Doxyfile')
-
-cmd = '$with_xsltproc ' + pjoin(env['AbsSrcRoot'],'docs','RngToXHTML.xsl') + ' $SOURCE > $TARGET'
-rng2xhtml = Builder(action=cmd, src_suffix='rng', suffix='html')
-env.Append(BUILDERS= {'Rng2XHTML':rng2xhtml})
-env.Rng2XHTML('HLVM.rng.html',['HLVM.rng'])
-env.Depends('HLVM.rng.html','RngToXHTML.xsl')
Modified: hlvm/trunk/hlvm/Pass/ResolveTypes.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Pass/ResolveTypes.h?rev=38185&r1=38184&r2=38185&view=diff
==============================================================================
--- hlvm/trunk/hlvm/Pass/ResolveTypes.h (original)
+++ hlvm/trunk/hlvm/Pass/ResolveTypes.h Sat Jul 7 19:00:55 2007
@@ -32,60 +32,59 @@
#include <hlvm/AST/Pass.h>
-namespace hlvm {
- using namespace AST;
-
-namespace Pass {
-
- /// This class provides a type resolution capability. It searches for
- /// instances of OpaqueType and resolves all their uses to the correct actual
- /// type.
- /// @brief Type Resolution Pass
- class ResolveTypes : public Pass
- {
- /// @}
- /// @name Constructors
- /// @{
- protected:
- ResolveTypes() : Pass(0) {}
- public:
- ~ResolveTypes();
-
- /// @}
- /// @name Handlers
- /// @{
- public:
- /// Handle a Block node. Subclasses should override this; default
- /// implementation does nothing.
- virtual void handle(Block* b);
-
- /// Handle a Bundle node. Subclasses should override this; default
- /// implementation does nothing.
- virtual void handle(Bundle* b);
-
- /// Handle a Function node. Subclasses should override this; default
- /// implementation does nothing.
- virtual void handle(Function* f);
-
- /// Handle a Program node. Subclasses should override this; default
- /// implementation does nothing.
- virtual void handle(Program* p);
-
- /// Handle a Operator node. Subclasses should override this; default
- /// implementation does nothing.
- virtual void handle(Operator* o);
-
- /// Handle a Type node. Subclasses should override this; default
- /// implementation does nothing.
- virtual void handle(Type* t);
-
- /// @}
- /// @name Data
- /// @{
- protected:
- int interest;
- /// @}
- };
-} // AST
-} // hlvm
+namespace hlvm {
+
+using namespace AST;
+
+/// This class provides a type resolution capability. It searches for
+/// instances of OpaqueType and resolves all their uses to the correct actual
+/// type.
+/// @brief Type Resolution Pass
+class ResolveTypes : public Pass
+{
+ /// @}
+ /// @name Constructors
+ /// @{
+ protected:
+ ResolveTypes() : Pass(0) {}
+ public:
+ ~ResolveTypes();
+
+ /// @}
+ /// @name Handlers
+ /// @{
+ public:
+ /// Handle a Block node. Subclasses should override this; default
+ /// implementation does nothing.
+ virtual void handle(Block* b);
+
+ /// Handle a Bundle node. Subclasses should override this; default
+ /// implementation does nothing.
+ virtual void handle(Bundle* b);
+
+ /// Handle a Function node. Subclasses should override this; default
+ /// implementation does nothing.
+ virtual void handle(Function* f);
+
+ /// Handle a Program node. Subclasses should override this; default
+ /// implementation does nothing.
+ virtual void handle(Program* p);
+
+ /// Handle a Operator node. Subclasses should override this; default
+ /// implementation does nothing.
+ virtual void handle(Operator* o);
+
+ /// Handle a Type node. Subclasses should override this; default
+ /// implementation does nothing.
+ virtual void handle(Type* t);
+
+ /// @}
+ /// @name Data
+ /// @{
+ protected:
+ int interest;
+ /// @}
+};
+
+} // end namespace hlvm
#endif
More information about the llvm-commits
mailing list