1#! /bin/sh -e 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright 2018 Luca Boccassi <[email protected]> 4 5EXAMPLES_DIR=$1 6API_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 10echo "$API_EXAMPLES: $(find ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) -printf '%p ' )" > ${API_EXAMPLES}.d 11 12exec > "${API_EXAMPLES}" 13printf '/**\n' 14printf '@page examples DPDK Example Programs\n\n' 15find "${EXAMPLES_DIR}" -type f -name '*.c' -printf '@example examples/%P\n' | LC_ALL=C sort 16printf '*/\n' 17