mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 09:36:10 +02:00
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:
parent
019f77c33d
commit
820b49e20c
@ -5,7 +5,8 @@
|
|||||||
# Creates the fpdoc HTML output for the LCL
|
# Creates the fpdoc HTML output for the LCL
|
||||||
# Creates an chm file, if HTMLFMT is set to chm,
|
# Creates an chm file, if HTMLFMT is set to chm,
|
||||||
# otherwise it create html docs
|
# otherwise it create html docs
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
#set -x
|
#set -x
|
||||||
set -e
|
set -e
|
||||||
@ -22,14 +23,62 @@ XMLSrcDir=../xml/lcl/
|
|||||||
PasSrcDir=../../lcl/
|
PasSrcDir=../../lcl/
|
||||||
InputFileList=inputfile.txt
|
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
|
# create output directory
|
||||||
mkdir -p $PackageName
|
mkdir -p $PackageName
|
||||||
|
|
||||||
# create unit list
|
# create unit list
|
||||||
cd $PasSrcDir
|
cd $PasSrcDir
|
||||||
UnitList=`echo *.pp *.pas`
|
FindUnitList=(*.pp *.pas)
|
||||||
cd -
|
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
|
# create description file list
|
||||||
DescrFiles=''
|
DescrFiles=''
|
||||||
for unit in $UnitList; do
|
for unit in $UnitList; do
|
||||||
|
Loading…
Reference in New Issue
Block a user