Valadoc support added.
This commit is contained in:
parent
5c2762a0ef
commit
8574b2d8c1
|
@ -131,50 +131,62 @@ for i in `seq 0 $((n-1))`; do
|
|||
# Converting Files to UTF-8 encoding
|
||||
find $TMP_PATH/$repo_dir_name \( ! -regex '.*/\..*' \) -type f -exec detect_encoding_and_convert.sh utf-8 '{}' \;
|
||||
|
||||
# Generate doxygen documentation
|
||||
doxygen -g doxygen.conf
|
||||
# Get full project name
|
||||
PROJECT_NAME=`mysql -h127.0.0.1 -u $MYSQL_USER --default-character-set=utf8 -e "SELECT name FROM $MYSQL_DBNAME.projects WHERE id=${project_id[$i]}" | grep -v tables_col|xargs| sed "s/ /\n/g"|tail -n+2`
|
||||
if [ -f valadoc_env ]; then
|
||||
echo "Generating documentation using Valadoc"
|
||||
VALA_BASEDIR=`grep -v '\.\.' valadoc_env | grep '^BASEDIR=[-+A-z0-9. ]\+$' | cut -d= -f2`
|
||||
VALA_PKGS=`grep -v '\.\.' valadoc_env | grep '^PKGS=[-+A-z0-9. ]\+$' | cut -d= -f2 | sed 's~\(^\| \)~ --pkg=~g; s~^ ~~'`
|
||||
echo VALA_BASEDIR=$VALA_BASEDIR
|
||||
echo VALA_PKGS=$VALA_PKGS
|
||||
valadoc -o $repo_dir_name-$LAST_TAG --no-protected -b "$VALA_BASEDIR" `find "$VALA_BASEDIR" -type f -name "*.vala" -or -name '*.vapi'` $VALA_PKGS
|
||||
mv $repo_dir_name-$LAST_TAG html
|
||||
else
|
||||
# -------- DOXYGEN --------------
|
||||
# Generate doxygen documentation
|
||||
echo "Generating documentation using Doxygen"
|
||||
doxygen -g doxygen.conf
|
||||
# Get full project name
|
||||
PROJECT_NAME=`mysql -h127.0.0.1 -u $MYSQL_USER --default-character-set=utf8 -e "SELECT name FROM $MYSQL_DBNAME.projects WHERE id=${project_id[$i]}" | grep -v tables_col|xargs| sed "s/ /\n/g"|tail -n+2`
|
||||
|
||||
sed "
|
||||
s~^PROJECT_NAME.*$~PROJECT_NAME = $PROJECT_NAME-$LAST_TAG~;
|
||||
s~^OUTPUT_LANGUAGE.*$~OUTPUT_LANGUAGE = English~;
|
||||
s~^BUILTIN_STL_SUPPORT.*$~BUILTIN_STL_SUPPORT = YES~;
|
||||
s~^EXTRACT_ALL.*$~EXTRACT_ALL = YES~;
|
||||
s~^EXTRACT_PRIVATE.*$~EXTRACT_PRIVATE = YES~;
|
||||
s~^EXTRACT_STATIC.*$~EXTRACT_STATIC = YES~;
|
||||
s~^EXTRACT_LOCAL_METHODS.*$~EXTRACT_LOCAL_METHODS = YES~;
|
||||
s~^EXTRACT_ANON_NSPACES.*$~EXTRACT_ANON_NSPACES = YES~;
|
||||
s~^FORCE_LOCAL_INCLUDES.*$~FORCE_LOCAL_INCLUDES = YES~;
|
||||
s~^SHOW_DIRECTORIES.*$~SHOW_DIRECTORIES = YES~;
|
||||
s~^RECURSIVE.*$~RECURSIVE = YES~;
|
||||
s~^SOURCE_BROWSER.*$~SOURCE_BROWSER = YES~;
|
||||
s~^VERBATIM_HEADERS.*$~VERBATIM_HEADERS = NO~;
|
||||
s~^REFERENCED_BY_RELATION.*$~REFERENCED_BY_RELATION = YES~;
|
||||
s~^REFERENCED_RELATION.*$~REFERENCED_RELATION = YES~;
|
||||
s~^GENERATE_LATEX.*$~GENERATE_LATEX = YES~;
|
||||
s~^HAVE_DOT.*$~HAVE_DOT = YES~;
|
||||
s~^UML_LOOK.*$~UML_LOOK = YES~;
|
||||
s~^TEMPLATE_RELATIONS.*$~TEMPLATE_RELATIONS = YES~;
|
||||
s~^CALL_GRAPH.*$~CALL_GRAPH = YES~;
|
||||
s~^CALLER_GRAPH.*$~CALLER_GRAPH = YES~;
|
||||
s~^EXCLUDE_PATTERNS.*$~EXCLUDE_PATTERNS = .hg .git~;
|
||||
s~^HTML_FOOTER.*$~HTML_FOOTER = footer.html~;
|
||||
s~^EXTRA_PACKAGES.*$~EXTRA_PACKAGES = babel~;
|
||||
" -i doxygen.conf
|
||||
sed "
|
||||
s~^PROJECT_NAME.*$~PROJECT_NAME = $PROJECT_NAME-$LAST_TAG~;
|
||||
s~^OUTPUT_LANGUAGE.*$~OUTPUT_LANGUAGE = English~;
|
||||
s~^BUILTIN_STL_SUPPORT.*$~BUILTIN_STL_SUPPORT = YES~;
|
||||
s~^EXTRACT_ALL.*$~EXTRACT_ALL = YES~;
|
||||
s~^EXTRACT_PRIVATE.*$~EXTRACT_PRIVATE = YES~;
|
||||
s~^EXTRACT_STATIC.*$~EXTRACT_STATIC = YES~;
|
||||
s~^EXTRACT_LOCAL_METHODS.*$~EXTRACT_LOCAL_METHODS = YES~;
|
||||
s~^EXTRACT_ANON_NSPACES.*$~EXTRACT_ANON_NSPACES = YES~;
|
||||
s~^FORCE_LOCAL_INCLUDES.*$~FORCE_LOCAL_INCLUDES = YES~;
|
||||
s~^SHOW_DIRECTORIES.*$~SHOW_DIRECTORIES = YES~;
|
||||
s~^RECURSIVE.*$~RECURSIVE = YES~;
|
||||
s~^SOURCE_BROWSER.*$~SOURCE_BROWSER = YES~;
|
||||
s~^VERBATIM_HEADERS.*$~VERBATIM_HEADERS = NO~;
|
||||
s~^REFERENCED_BY_RELATION.*$~REFERENCED_BY_RELATION = YES~;
|
||||
s~^REFERENCED_RELATION.*$~REFERENCED_RELATION = YES~;
|
||||
s~^GENERATE_LATEX.*$~GENERATE_LATEX = YES~;
|
||||
s~^HAVE_DOT.*$~HAVE_DOT = YES~;
|
||||
s~^UML_LOOK.*$~UML_LOOK = YES~;
|
||||
s~^TEMPLATE_RELATIONS.*$~TEMPLATE_RELATIONS = YES~;
|
||||
s~^CALL_GRAPH.*$~CALL_GRAPH = YES~;
|
||||
s~^CALLER_GRAPH.*$~CALLER_GRAPH = YES~;
|
||||
s~^EXCLUDE_PATTERNS.*$~EXCLUDE_PATTERNS = .hg .git~;
|
||||
s~^HTML_FOOTER.*$~HTML_FOOTER = footer.html~;
|
||||
s~^EXTRA_PACKAGES.*$~EXTRA_PACKAGES = babel~;
|
||||
" -i doxygen.conf
|
||||
|
||||
# project name and version in the footer
|
||||
echo "<hr /><a href=\"$repo_dir_name-$LAST_TAG.pdf\">$repo_dir_name-$LAST_TAG.pdf</a>" > footer.html
|
||||
# project name and version in the footer
|
||||
echo "<hr /><a href=\"$repo_dir_name-$LAST_TAG.pdf\">$repo_dir_name-$LAST_TAG.pdf</a>" > footer.html
|
||||
|
||||
# run doxygen generator
|
||||
doxygen doxygen.conf
|
||||
# run doxygen generator
|
||||
doxygen doxygen.conf
|
||||
|
||||
# README in title page
|
||||
README="`find -maxdepth 1 -type f -iname 'readme*' | head -n1`"
|
||||
if [ -f "$README" ]; then
|
||||
sed -i 's~http\(\|s\)\(://[^ \n\t]*\)~<a href="http\1\2">http\1\2</a>~g' README
|
||||
sed -i 's~$~<br>~' "$README"
|
||||
sed -i "/<div class=\"contents\">/r $README" html/index.html
|
||||
# README in title page
|
||||
README="`find -maxdepth 1 -type f -iname 'readme*' | head -n1`"
|
||||
if [ -f "$README" ]; then
|
||||
sed -i 's~http\(\|s\)\(://[^ \n\t]*\)~<a href="http\1\2">http\1\2</a>~g' README
|
||||
sed -i 's~$~<br>~' "$README"
|
||||
sed -i "/<div class=\"contents\">/r $README" html/index.html
|
||||
fi
|
||||
fi
|
||||
|
||||
# Copy html to $DOC_PATH
|
||||
|
@ -182,10 +194,12 @@ for i in `seq 0 $((n-1))`; do
|
|||
[ $? != 0 ] && echo "mkdir -p $DOC_PATH/${identifier[$i]} failed" && rm -rf $TMP_PATH && rm -f $DOC_PATH/${identifier[$i]}/tag && exit -1
|
||||
rm -rf $DOC_PATH/${identifier[$i]}/html
|
||||
cp -r html $DOC_PATH/${identifier[$i]}
|
||||
sed 's~\<pdflatex\>~pdflatex -interaction batchmode~g' -i latex/Makefile
|
||||
sed 's~\\usepackage{babel}~\\usepackage[russian]{babel}~' -i latex/refman.tex
|
||||
make -C latex -f Makefile
|
||||
cp -f latex/refman.pdf $DOC_PATH/${identifier[$i]}/html/$repo_dir_name-$LAST_TAG.pdf
|
||||
if [ -f Makefile ]; then
|
||||
sed 's~\<pdflatex\>~pdflatex -interaction batchmode~g' -i latex/Makefile
|
||||
sed 's~\\usepackage{babel}~\\usepackage[russian]{babel}~' -i latex/refman.tex
|
||||
make -C latex -f Makefile
|
||||
cp -f latex/refman.pdf $DOC_PATH/${identifier[$i]}/html/$repo_dir_name-$LAST_TAG.pdf
|
||||
fi
|
||||
|
||||
# remove temp dir
|
||||
cd $TMP_PATH
|
||||
|
|
Loading…
Reference in New Issue