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
|
# Converting Files to UTF-8 encoding
|
||||||
find $TMP_PATH/$repo_dir_name \( ! -regex '.*/\..*' \) -type f -exec detect_encoding_and_convert.sh utf-8 '{}' \;
|
find $TMP_PATH/$repo_dir_name \( ! -regex '.*/\..*' \) -type f -exec detect_encoding_and_convert.sh utf-8 '{}' \;
|
||||||
|
|
||||||
# Generate doxygen documentation
|
if [ -f valadoc_env ]; then
|
||||||
doxygen -g doxygen.conf
|
echo "Generating documentation using Valadoc"
|
||||||
# Get full project name
|
VALA_BASEDIR=`grep -v '\.\.' valadoc_env | grep '^BASEDIR=[-+A-z0-9. ]\+$' | cut -d= -f2`
|
||||||
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`
|
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 "
|
sed "
|
||||||
s~^PROJECT_NAME.*$~PROJECT_NAME = $PROJECT_NAME-$LAST_TAG~;
|
s~^PROJECT_NAME.*$~PROJECT_NAME = $PROJECT_NAME-$LAST_TAG~;
|
||||||
s~^OUTPUT_LANGUAGE.*$~OUTPUT_LANGUAGE = English~;
|
s~^OUTPUT_LANGUAGE.*$~OUTPUT_LANGUAGE = English~;
|
||||||
s~^BUILTIN_STL_SUPPORT.*$~BUILTIN_STL_SUPPORT = YES~;
|
s~^BUILTIN_STL_SUPPORT.*$~BUILTIN_STL_SUPPORT = YES~;
|
||||||
s~^EXTRACT_ALL.*$~EXTRACT_ALL = YES~;
|
s~^EXTRACT_ALL.*$~EXTRACT_ALL = YES~;
|
||||||
s~^EXTRACT_PRIVATE.*$~EXTRACT_PRIVATE = YES~;
|
s~^EXTRACT_PRIVATE.*$~EXTRACT_PRIVATE = YES~;
|
||||||
s~^EXTRACT_STATIC.*$~EXTRACT_STATIC = YES~;
|
s~^EXTRACT_STATIC.*$~EXTRACT_STATIC = YES~;
|
||||||
s~^EXTRACT_LOCAL_METHODS.*$~EXTRACT_LOCAL_METHODS = YES~;
|
s~^EXTRACT_LOCAL_METHODS.*$~EXTRACT_LOCAL_METHODS = YES~;
|
||||||
s~^EXTRACT_ANON_NSPACES.*$~EXTRACT_ANON_NSPACES = YES~;
|
s~^EXTRACT_ANON_NSPACES.*$~EXTRACT_ANON_NSPACES = YES~;
|
||||||
s~^FORCE_LOCAL_INCLUDES.*$~FORCE_LOCAL_INCLUDES = YES~;
|
s~^FORCE_LOCAL_INCLUDES.*$~FORCE_LOCAL_INCLUDES = YES~;
|
||||||
s~^SHOW_DIRECTORIES.*$~SHOW_DIRECTORIES = YES~;
|
s~^SHOW_DIRECTORIES.*$~SHOW_DIRECTORIES = YES~;
|
||||||
s~^RECURSIVE.*$~RECURSIVE = YES~;
|
s~^RECURSIVE.*$~RECURSIVE = YES~;
|
||||||
s~^SOURCE_BROWSER.*$~SOURCE_BROWSER = YES~;
|
s~^SOURCE_BROWSER.*$~SOURCE_BROWSER = YES~;
|
||||||
s~^VERBATIM_HEADERS.*$~VERBATIM_HEADERS = NO~;
|
s~^VERBATIM_HEADERS.*$~VERBATIM_HEADERS = NO~;
|
||||||
s~^REFERENCED_BY_RELATION.*$~REFERENCED_BY_RELATION = YES~;
|
s~^REFERENCED_BY_RELATION.*$~REFERENCED_BY_RELATION = YES~;
|
||||||
s~^REFERENCED_RELATION.*$~REFERENCED_RELATION = YES~;
|
s~^REFERENCED_RELATION.*$~REFERENCED_RELATION = YES~;
|
||||||
s~^GENERATE_LATEX.*$~GENERATE_LATEX = YES~;
|
s~^GENERATE_LATEX.*$~GENERATE_LATEX = YES~;
|
||||||
s~^HAVE_DOT.*$~HAVE_DOT = YES~;
|
s~^HAVE_DOT.*$~HAVE_DOT = YES~;
|
||||||
s~^UML_LOOK.*$~UML_LOOK = YES~;
|
s~^UML_LOOK.*$~UML_LOOK = YES~;
|
||||||
s~^TEMPLATE_RELATIONS.*$~TEMPLATE_RELATIONS = YES~;
|
s~^TEMPLATE_RELATIONS.*$~TEMPLATE_RELATIONS = YES~;
|
||||||
s~^CALL_GRAPH.*$~CALL_GRAPH = YES~;
|
s~^CALL_GRAPH.*$~CALL_GRAPH = YES~;
|
||||||
s~^CALLER_GRAPH.*$~CALLER_GRAPH = YES~;
|
s~^CALLER_GRAPH.*$~CALLER_GRAPH = YES~;
|
||||||
s~^EXCLUDE_PATTERNS.*$~EXCLUDE_PATTERNS = .hg .git~;
|
s~^EXCLUDE_PATTERNS.*$~EXCLUDE_PATTERNS = .hg .git~;
|
||||||
s~^HTML_FOOTER.*$~HTML_FOOTER = footer.html~;
|
s~^HTML_FOOTER.*$~HTML_FOOTER = footer.html~;
|
||||||
s~^EXTRA_PACKAGES.*$~EXTRA_PACKAGES = babel~;
|
s~^EXTRA_PACKAGES.*$~EXTRA_PACKAGES = babel~;
|
||||||
" -i doxygen.conf
|
" -i doxygen.conf
|
||||||
|
|
||||||
# project name and version in the footer
|
# 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
|
echo "<hr /><a href=\"$repo_dir_name-$LAST_TAG.pdf\">$repo_dir_name-$LAST_TAG.pdf</a>" > footer.html
|
||||||
|
|
||||||
# run doxygen generator
|
# run doxygen generator
|
||||||
doxygen doxygen.conf
|
doxygen doxygen.conf
|
||||||
|
|
||||||
# README in title page
|
# README in title page
|
||||||
README="`find -maxdepth 1 -type f -iname 'readme*' | head -n1`"
|
README="`find -maxdepth 1 -type f -iname 'readme*' | head -n1`"
|
||||||
if [ -f "$README" ]; then
|
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~http\(\|s\)\(://[^ \n\t]*\)~<a href="http\1\2">http\1\2</a>~g' README
|
||||||
sed -i 's~$~<br>~' "$README"
|
sed -i 's~$~<br>~' "$README"
|
||||||
sed -i "/<div class=\"contents\">/r $README" html/index.html
|
sed -i "/<div class=\"contents\">/r $README" html/index.html
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy html to $DOC_PATH
|
# 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
|
[ $? != 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
|
rm -rf $DOC_PATH/${identifier[$i]}/html
|
||||||
cp -r html $DOC_PATH/${identifier[$i]}
|
cp -r html $DOC_PATH/${identifier[$i]}
|
||||||
sed 's~\<pdflatex\>~pdflatex -interaction batchmode~g' -i latex/Makefile
|
if [ -f Makefile ]; then
|
||||||
sed 's~\\usepackage{babel}~\\usepackage[russian]{babel}~' -i latex/refman.tex
|
sed 's~\<pdflatex\>~pdflatex -interaction batchmode~g' -i latex/Makefile
|
||||||
make -C latex -f Makefile
|
sed 's~\\usepackage{babel}~\\usepackage[russian]{babel}~' -i latex/refman.tex
|
||||||
cp -f latex/refman.pdf $DOC_PATH/${identifier[$i]}/html/$repo_dir_name-$LAST_TAG.pdf
|
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
|
# remove temp dir
|
||||||
cd $TMP_PATH
|
cd $TMP_PATH
|
||||||
|
|
Loading…
Reference in New Issue