test mbuf attach
[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 # generate a .d file including both C files and also build files, so we can
9 # detect both file changes and file additions/deletions
10 echo "$API_EXAMPLES: $(find ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) -printf '%p ' )" > ${API_EXAMPLES}.d
11
12 exec > "${API_EXAMPLES}"
13 printf '/**\n'
14 printf '@page examples DPDK Example Programs\n\n'
15 find "${EXAMPLES_DIR}" -type f -name '*.c' -printf '@example examples/%P\n' | LC_ALL=C sort
16 printf '*/\n'