结论:已完成浏览器侧真实加载验证,M428/M429/M430 的配置入口进一步从 LinuxCNC INI/HALFILE/REMAP 来源生成,native 与 source-link 验证通过。
69 lines
1.7 KiB
Bash
Executable File
69 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
linuxcnc_root=${LINUXCNC_ROOT:-../linuxcnc}
|
|
include_python=0
|
|
include_core_include=0
|
|
include_core_src=0
|
|
syntax_only=0
|
|
emit_ulapi=1
|
|
|
|
while [[ "$#" -gt 0 ]]; do
|
|
case "$1" in
|
|
--python)
|
|
include_python=1
|
|
shift
|
|
;;
|
|
--core-include)
|
|
include_core_include=1
|
|
shift
|
|
;;
|
|
--core-src)
|
|
include_core_src=1
|
|
shift
|
|
;;
|
|
--syntax-only)
|
|
syntax_only=1
|
|
shift
|
|
;;
|
|
--no-ulapi)
|
|
emit_ulapi=0
|
|
shift
|
|
;;
|
|
--)
|
|
shift
|
|
break
|
|
;;
|
|
*)
|
|
echo "unknown source cxxflag option: $1" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs.sh --root-only
|
|
|
|
python_includes=()
|
|
if [[ "$include_python" -eq 1 ]]; then
|
|
python_include_output=$(python3.13-config --includes 2>/dev/null || python3-config --includes)
|
|
read -r -a python_includes <<<"$python_include_output"
|
|
fi
|
|
|
|
printf '%s\n' \
|
|
-std=c++17 \
|
|
-fpermissive \
|
|
$([[ "$emit_ulapi" -eq 1 ]] && printf '%s\n' -DULAPI) \
|
|
$([[ "$syntax_only" -eq 1 ]] && printf '%s\n' -fsyntax-only) \
|
|
"${python_includes[@]}" \
|
|
$([[ "$include_core_include" -eq 1 ]] && printf '%s\n' -I core/include) \
|
|
$([[ "$include_core_src" -eq 1 ]] && printf '%s\n' -I core/src) \
|
|
-I "$linuxcnc_root/src" \
|
|
-I "$linuxcnc_root/src/emc" \
|
|
-I "$linuxcnc_root/src/emc/nml_intf" \
|
|
-I "$linuxcnc_root/src/emc/rs274ngc" \
|
|
-I "$linuxcnc_root/src/emc/motion" \
|
|
-I "$linuxcnc_root/src/emc/pythonplugin" \
|
|
-I "$linuxcnc_root/include"
|