dma/idxd: support allow/block list
[dpdk.git] / doc / api / generate_examples.sh
1 #! /bin/sh -e
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2018 Luca Boccassi <bluca@debian.org>
4
5 EXAMPLES_DIR=$1
6 API_EXAMPLES=$2
7
8 FIND=find
9
10 # generate a .d file including both C files and also build files, so we can
11 # detect both file changes and file additions/deletions
12 echo "$API_EXAMPLES: $($FIND ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) | tr '\n' ' ' )" > ${API_EXAMPLES}.d
13
14 exec > "${API_EXAMPLES}"
15 printf '/**\n'
16 printf '@page examples DPDK Example Programs\n\n'
17 $FIND "${EXAMPLES_DIR}" -type f -name '*.c' |
18         sed "s|${EXAMPLES_DIR}|@example examples|" |
19         LC_ALL=C sort
20 printf '*/\n'