Permalink
Browse files

Doxygen: Updated scripts

  • Loading branch information...
Henry Henry
Henry authored and Henry committed Feb 8, 2011
1 parent b5de657 commit 9d2dd28ff10f9703e662215e1bf8cab555053414
@@ -1,11 +1,11 @@
#!/bin/sh
-#---------------------------------*- sh -*-------------------------------------
+#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation |
-#------------------------------------------------------------------------------
+#-------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
@@ -23,7 +23,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
-# doxyFilt
+# doxyFilter
#
# Description
# pass-through filter for doxygen
@@ -43,19 +43,19 @@ then
dirName=${filePath%/[^/]*}
fileName=${filePath##*/}
- awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt.awk
+ awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilter.awk
case "$1" in
*/applications/solvers/*.C | */applications/utilities/*.C )
- awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-top.awk
+ awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilter-top.awk
;;
# */applications/solvers/*.H | */applications/utilities/*.H )
-# awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilt-ignore.awk
+# awkScript=$WM_PROJECT_DIR/bin/tools/doxyFilter-ignore.awk
# ;;
- esac
+ esac
awk -f $awkScript $1 | \
- sed -f $WM_PROJECT_DIR/bin/tools/doxyFilt.sed \
+ sed -f $WM_PROJECT_DIR/bin/tools/doxyFilter.sed \
-e s@%filePath%@$filePath@g \
-e s@%fileName%@$fileName@g \
-e s@%dirName%@$dirName@g
@@ -1,10 +1,10 @@
-#------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation |
-#------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
@@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
-# doxyFilt-ignore.awk
+# doxyFilter-ignore.awk
#
# Description
# - Prefix file contents with doxygen @file tag and %filePath% tag
@@ -37,8 +37,8 @@ BEGIN {
}
{ print }
-
+
END {
- print "//! @endcond OpenFOAMIgnoreAppDoxygen"
+ print "//! @endcond"
}
# -----------------------------------------------------------------------------
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
-# doxyFilt-top.awk
+# doxyFilter-top.awk
#
# Description
# Only output the first /* ... */ comment section found in the file
@@ -74,7 +74,7 @@ FNR == 1 {
END {
if (state == 2)
{
- print "//! @endcond OpenFOAMIgnoreAppDoxygen"
+ print "//! @endcond"
}
}
@@ -2,9 +2,9 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
+# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
# \\/ M anipulation |
-#------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
@@ -22,7 +22,7 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
-# doxyFilt.awk
+# doxyFilter.awk
#
# Description
# Converts cocoon style sentinel strings into doxygen style strings
@@ -57,7 +57,7 @@ BEGIN {
# start comment block
if (state == 1)
{
- printf "/*!\n"
+ printf "/*! "
state = 2
}
@@ -79,7 +79,7 @@ BEGIN {
# end comment block
if (state == 2)
{
- printf "*/\n"
+ printf "*/ "
}
state = 0
print
@@ -1,34 +1,30 @@
# -----------------------------------------------------------------------------
# Script
-# doxyFilt.sed
+# doxyFilter.sed
#
# Description
# Transform human-readable tags such as 'Description' into the Doxygen
# equivalent
# -----------------------------------------------------------------------------
+# new FSF address
/^License/,/\*\//{
-/^License/,/MA 0211.-130. USA/{
+/^License/,\%http://www.gnu.org/licenses%{
s?^License.*?\*\/\
-\/\*! @file %filePath%\
+\/\*! \\file %filePath%\
<b>Original source file</b> <a href="%filePath%">%fileName%</a>\
+\
+\
+\
+\
+\
+\
+\
+\
?
/^ /d
}
-# remove entry
-/^Primitive *$/{
-N
-N
-d
-}
-
-# remove entry
-/^Implementation *$/{
-N
-N
-d
-}
# remove entry
/^Application *$/{
@@ -37,12 +33,6 @@ N
d
}
-# remove entry
-/^Type *$/{
-N
-N
-d
-}
# remove entry
/^Global *$/{
@@ -52,98 +42,109 @@ d
}
+# Primitive
+# typename
+# =>
+# \\relates typename
+#
+/^Primitive *$/,/^[^ ]/{
+s/^Primitive *$//
+s/^ /\\relates /
+}
+
+
# Class
# Foam::className
# =>
-# @class Foam::className
+# \\class Foam::className
#
/^Class *$/,/^[^ ]/{
-/^Class/d
-s/^ /@class /
+s/^Class *$//
+s/^ /\\class /
}
# Namespace
# namespaceName
# =>
-# @namespace namespaceName
+# \namespace namespaceName
#
/^Namespace *$/,/^[^ ]/{
-/^Namespace/d
-s/^ /@namespace /
+s/^Namespace//
+s/^ /\\namespace /
}
# Typedef
# Foam::def
# =>
-# @class Foam::def
-# This is not strictly correct, but makes it easier to find the typedefs
+# \typedef Foam::def
/^Typedef *$/,/^[^ ]/{
-/^Typedef/d
-s/^ /@class /
+s/^Typedef//
+s/^ /\\typedef /
}
-# add anchor and use @brief
+# add anchor and use \brief
# the first paragraph will be 'brief' and the others 'detail'
/^Description *$/,/^[^ ]/{
/^Description/c\
-<a class="anchor" name="Description"></a>\
-@brief
+<a class="anchor" name="Description"></a> \\brief
s/^ //
}
/^Usage *$/,/^[^ ]/{
/^Usage/c\
-@par Usage
+\\par Usage
s/^ //
}
/^See *Also *$/,/^[^ ]/{
/^See *Also/c\
-@see
-s/^ //
-}
-
-/^Author *$/,/^[^ ]/{
-/^Author/c\
-@author
+\\see
s/^ //
}
/^Note *$/,/^[^ ]/{
/^Note/c\
-@note
+\\note
s/^ //
}
+# remove ToDo paragraph to avoid them showing on related pages
/^To[Dd]o *$/,/^[^ ]/{
-/^To[Dd]o/c\
-@todo
-s/^ //
+s/^To[Dd]o *$//
+s/^ .*//
}
+
/^Warning *$/,/^[^ ]/{
/^Warning/c\
-@warning
+\\warning
s/^ //
}
+
/^Deprecated *$/,/^[^ ]/{
/^Deprecated/c\
-@deprecated
+\\deprecated
s/^ //
}
-/SourceFiles/,/^[ ]*$/{
-s?SourceFiles?@par Source files\
-<ul>\
- <li><a href="%filePath%">%fileName%</a></li>?
-s?^[ ]*$?</ul>\
-?
+
+/^SourceFiles *$/,/^$/{
+s?SourceFiles?\\par Source files\
+<ul><li><a href="%filePath%">%fileName%</a></li>?
+s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?
+s?^$?</ul>?
+}
+
+/fileName%<\/a><\/li>$/{
+N
+s?\n$?</ul>?g
+s/<\/li>\n/<\/li> /
s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?
}
View
@@ -567,7 +567,7 @@ IMAGE_PATH =
# to standard output. If FILTER_PATTERNS is specified, this tag will be
# ignored.
-INPUT_FILTER = doxyFilt
+INPUT_FILTER = $(WM_PROJECT_DIR)/bin/tools/doxyFilter
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
# basis. Doxygen will compare the file name with each pattern and apply the
@@ -683,21 +683,19 @@ HTML_OUTPUT = html
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
-HTML_FILE_EXTENSION = .php
+HTML_FILE_EXTENSION = .html
# The HTML_HEADER tag can be used to specify a personal HTML header for
# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
-
-HTML_HEADER = FoamHeader.html
+HTML_HEADER = $(WM_PROJECT_DIR)/doc/Doxygen/FoamHeader.html
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
-HTML_FOOTER = FoamFooter.html
-
+HTML_FOOTER = $(WM_PROJECT_DIR)/doc/Doxygen/FoamFooter.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
# style sheet that is used by each HTML page. It can be used to
@@ -712,7 +710,7 @@ HTML_STYLESHEET =
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
-HTML_ALIGN_MEMBERS = NO
+HTML_ALIGN_MEMBERS = YES
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the

0 comments on commit 9d2dd28

Please sign in to comment.