说明:集中 LinuxCNC 源码清单与 wasm/native probe 的路径解析,补强 manifest、shim、source-link 检查,并保持 LinuxCNC 源码后端对齐验证流程可复用。 验证:./test-native.sh;./test-linuxcnc-source-link.sh;./test-all-native.sh;wasm source/probe 相关脚本。
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
|
filter=${1:-}
|
|
|
|
if [[ ! -d "$linuxcnc_root" ]]; then
|
|
echo "missing LinuxCNC root: $linuxcnc_root" >&2
|
|
exit 1
|
|
fi
|
|
|
|
objects=(
|
|
src/objects/emc/rs274ngc/interpmodule.o
|
|
src/objects/emc/rs274ngc/canonmodule.o
|
|
src/objects/emc/rs274ngc/pyarrays.o
|
|
src/objects/emc/rs274ngc/pyblock.o
|
|
src/objects/emc/rs274ngc/pyemctypes.o
|
|
src/objects/emc/rs274ngc/pyinterp1.o
|
|
src/objects/emc/rs274ngc/pyparamclass.o
|
|
src/objects/emc/nml_intf/emcops.o
|
|
src/objects/emc/sai/dummyemcstat.o
|
|
src/objects/libnml/nml/stat_msg.o
|
|
)
|
|
|
|
found=0
|
|
for object in "${objects[@]}"; do
|
|
full_object="$linuxcnc_root/$object"
|
|
if [[ ! -f "$full_object" ]]; then
|
|
echo "missing LinuxCNC support object: $full_object" >&2
|
|
echo "build LinuxCNC first or set LINUXCNC_ROOT to a built tree" >&2
|
|
exit 1
|
|
fi
|
|
if [[ -n "$filter" && "$(basename "$object")" != "$filter" ]]; then
|
|
continue
|
|
fi
|
|
found=1
|
|
printf '%s\n' "$full_object"
|
|
done
|
|
|
|
if [[ -n "$filter" && "$found" -eq 0 ]]; then
|
|
echo "missing LinuxCNC support object in list: $filter" >&2
|
|
exit 1
|
|
fi
|