Files
wasm-simulator/list-cnc-sim-core-sources.sh

44 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
# LinuxCNC source basis: native core smoke builds enumerate CMake-listed bridge
# and kinematics adapter sources that wrap LinuxCNC canon.hh and
# src/emc/kinematics behavior; the legacy smoke backend is included only when
# explicitly requested for API harness coverage.
include_smoke=0
filter=
for arg in "$@"; do
case "$arg" in
--with-smoke)
include_smoke=1
;;
--*)
echo "unknown cnc sim core source option: $arg" >&2
exit 1
;;
*)
if [[ -n "$filter" ]]; then
echo "usage: $0 [--with-smoke] [filter]" >&2
exit 1
fi
filter=$arg
;;
esac
done
source_list=$(mktemp)
trap 'rm -f "$source_list"' EXIT
{
./list-cmake-set-sources.sh cnc_sim_core_sources core/
if [[ "$include_smoke" -eq 1 ]]; then
./list-cmake-set-sources.sh cnc_sim_smoke_backend_sources core/
fi
} > "$source_list"
./list-filtered-existing-paths.sh \
"$filter" \
"missing cnc sim core source" \
"missing cnc sim core source in CMake list" < "$source_list"