topology2: doc: topology2-generate-contents.sh: Script to generate contents

This commit adds topology2-generate-contents.sh the script to generate the
contents page that will be inline included to the mainpage added in the next
commit.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
This commit is contained in:
Jyri Sarha 2023-09-27 19:01:26 +03:00 committed by Liam Girdwood
parent 23a74a382c
commit 59dd233c43
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
#!/bin/bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2023 Intel Corporation. All rights reserved.
# This script generates the contents page and stores it in extra-contents/contents.doxy
set -e
cd "$(dirname "$0")"
generate_contents ()
{
cat <<EOF
# This contents list is automatically generated by $0.
/*! \page doc_contents
\section doc_classes Classes
EOF
for ctype in Base Widget Control Dai Pipeline
do
echo " \subsection doc_${ctype,}_classes $ctype Classes"
find .. -name \*.conf -print0 |
xargs -0 awk "/^Class\.$ctype\./ "'{
split($1, a, "\\.");
name = a[3]; gsub("\"", "", name); gsub("-", "_", name);
print "\t\\li \\ref " name
}' | sort -u
echo
done
echo '*/'
}
generate_contents