Skip to content

Commit

Permalink
Merge pull request #13 from theZiz/topic-remove-doxygen-generated-xml
Browse files Browse the repository at this point in the history
Removed doxygen xml files from repo and build them on the fly if needed
  • Loading branch information
theZiz committed Oct 22, 2018
2 parents 333a3c2 + f5d37b3 commit 0aa97ab
Show file tree
Hide file tree
Showing 395 changed files with 34 additions and 47,172 deletions.
20 changes: 0 additions & 20 deletions documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@echo -n \\033[1\;37mBuilding doxygen doc...\\033[0m
@doxygen $(DOXYGENDIR)/Doxyfile > /dev/null
@echo done
# fixing doxygen bug which puts typedef in every "using" statement
@find doxygen/xml -type f -exec sed -i "s/typedef //g" {} \;
# fixing breathe bug which is confused by members of templated classes
@find doxygen/xml -type f -exec sed -i "s/llama::Array< T, T_dim >::/llama::Array::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::DatumCoord&lt; T_coords &gt;::/<definition>using llama::DatumCoord::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/llama::VirtualDatum&lt; T_View &gt;::/llama::VirtualDatum::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/llama::View&lt; T_Mapping, T_BlobType &gt;::/llama::View::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::VirtualView&lt; T_ParentViewType &gt;::/<definition>using llama::VirtualView::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::Tuple&lt; T_Elements &gt;::/<definition>using llama::Tuple::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::allocator::Vector&lt; T_alignment &gt;::/<definition>using llama::allocator::Vector::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::allocator::SharedPtr&lt; T_alignment &gt;::/<definition>using llama::allocator::SharedPtr::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::allocator::Stack&lt; reserved &gt;::/<definition>using llama::allocator::Stack::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using common::allocator::Alpaka&lt; T_DevAcc, T_Size &gt;::/<definition>using common::allocator::Alpaka::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using common::allocator::AlpakaMirror&lt; T_DevAcc, T_Size, T_Mapping &gt;::/<definition>using common::allocator::AlpakaMirror::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using common::allocator::AlpakaShared&lt; T_Acc, T_count, T_uniqueID &gt;::/<definition>using common::allocator::AlpakaShared::/g" {} \;
@find doxygen/xml -type f -exec sed -i "s/<definition>using llama::VirtualDatum&lt; T_View, T_BoundDatumDomain &gt;::/<definition>using llama::VirtualDatum::/g" {} \;
# running sphinx-build while ignoring a warning generated by breathe from valid doxygen code
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 2>&1 | grep -v "WARNING: Duplicate declaration."
36 changes: 34 additions & 2 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

# -- Adding llama and alpaka keywords by hand to pygments --

import os
import site

# -- Adding llama and alpaka keywords by hand to pygments --

user_site = site.USER_SITE
if not os.path.isdir( user_site ):
user_site = "/home/docs/checkouts/readthedocs.org/user_builds/llama-doc/envs/latest/lib/python2.7/site-packages"
Expand All @@ -28,6 +29,37 @@
if not "(words(('llama', 'alpaka')), Name.Exception)" in open(c_cpp_lexer_file).read():
os.system( "sed -i \"/'statements': \\[/a \\ (words(('llama', 'alpaka')), Name.Exception),\" " + c_cpp_lexer_file )

# -- Updating doxygen --

os.system( "doxygen Doxyfile > /dev/null" )

# -- Fixing doxygen bug which puts typedef in every "using" statement

os.system( 'find doxygen/xml -type f -exec sed -i "s/typedef //g" {} \;' )

# -- Fixing breathe bug which is confused by members of templated classes

def fixBug( prefix, className, templateList ):
os.system(
'find doxygen/xml -type f -exec sed -i "s/' +
prefix + className + '&lt; ' + templateList + ' &gt;::/' +
prefix + className + '::/g" {} \;'
);

fixBug( "", "llama::Array", "T, T_dim" )
fixBug( "", "llama::VirtualDatum", "T_View" )
fixBug( "", "llama::View", "T_Mapping, T_BlobType" )
fixBug( "<definition>using ", "llama::DatumCoord", "T_coords" )
fixBug( "<definition>using ", "llama::VirtualView", "T_ParentViewType" )
fixBug( "<definition>using ", "llama::Tuple", "T_Elements" )
fixBug( "<definition>using ", "llama::allocator::Vector", "T_alignment" )
fixBug( "<definition>using ", "llama::allocator::SharedPtr", "T_alignment" )
fixBug( "<definition>using ", "llama::allocator::Stack", "reserved" )
fixBug( "<definition>using ", "common::allocator::Alpaka", "T_DevAcc, T_Size" )
fixBug( "<definition>using ", "common::allocator::AlpakaMirror", "T_DevAcc, T_Size, T_Mapping" )
fixBug( "<definition>using ", "common::allocator::AlpakaShared", "T_Acc, T_count, T_uniqueID" )
fixBug( "<definition>using ", "llama::VirtualDatum", "T_View, T_BoundDatumDomain" )

# -- Project information -----------------------------------------------------

project = u'LLAMA'
Expand Down

0 comments on commit 0aa97ab

Please sign in to comment.