lcl docs: pass units in order of dependencies to fpdoc, to work around the fact that fpdoc doesn't reorder them, so that it can create the links correctly.

patch by: Marco van de Voort
Issue #17246

git-svn-id: trunk@28095 -
This commit is contained in:
vincents 2010-11-05 11:25:47 +00:00
parent 019f77c33d
commit 820b49e20c

View File

@ -5,7 +5,8 @@
# Creates the fpdoc HTML output for the LCL
# Creates an chm file, if HTMLFMT is set to chm,
# otherwise it create html docs
#
#
#set -x
set -e
@ -22,14 +23,62 @@ XMLSrcDir=../xml/lcl/
PasSrcDir=../../lcl/
InputFileList=inputfile.txt
# list with units in a preseeded order.
# missing units will be dropped from this list, other units added.
# units not in import order will mutilate links.
PreorderUnitList=( lclbase fpcadds lclstrconsts masks fileutil utf8process lcltype lclproc tmschema lresources lclclasses )
PreorderUnitList+=( avglvltree graphmath graphtype lmessages interfacebase lclrescache graphics imglist themes actnlist clipbrd stdactns )
PreorderUnitList+=( graphics controls forms stdctrls extctrls buttons dialogs comctrls )
PreorderUnitList+=( lazhelpintf printers grids dbgrids menus )
#------------------
inarray()
{ local tofind=$1 element;
shift; for element; do [[ $element = "$tofind" ]] && return; done; return 1;
}
# Usage: inarray "$value" "${array[@]}"
UnitListArr=()
# create output directory
mkdir -p $PackageName
# create unit list
cd $PasSrcDir
UnitList=`echo *.pp *.pas`
FindUnitList=(*.pp *.pas)
cd -
# test for preorder unit existance, add them to unitlist.
for preorder in ${PreorderUnitList[@]}; do
if [ -f $PasSrcDir/$preorder.pp ]
then
UnitListArr+=($preorder.pp)
fi
if [ -f $PasSrcDir/$preorder.pas ]
then
UnitListArr+=($preorder.pas)
fi
done
#echo 1 ${UnitListArr[@]}
for foundunit in ${FindUnitList[@]}; do
if ! inarray "$foundunit" "${UnitListArr[@]}"
then
UnitListArr+=($foundunit)
fi
done
UnitList=
for foundunit in ${UnitListArr[@]}; do
UnitList+="$foundunit "
done
# echo 2 $UnitList
# create description file list
DescrFiles=''
for unit in $UnitList; do