满庭芳·源流归一
结论:LinuxCNC rs274ngc 源码移植边界继续收拢。已将 rs274ngc 头文件纳入 manifest 跟踪,core 编译组仍只包含可编译源文件;启用 CNC_SIM_ENABLE_LINUXCNC_RS274_BACKEND 时 API 默认使用 LinuxCNC rs274 后端;M428/M429/M430 与 5axis/TRT/TDR/RTCP 相关路径继续保持来自 LinuxCNC 源码或 remap 配置的薄桥接。 验证:./test-linuxcnc-source-syntax.sh;./test-linuxcnc-api-native.sh;./test-native.sh;./test-linuxcnc-source-link.sh。
This commit is contained in:
35
list-cmake-set-sources.sh
Executable file
35
list-cmake-set-sources.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [[ "$#" -lt 1 || "$#" -gt 2 ]]; then
|
||||
echo "usage: $0 <cmake-set-name> [relative-prefix]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set_name=$1
|
||||
relative_prefix=${2:-}
|
||||
|
||||
awk -v set_name="$set_name" -v relative_prefix="$relative_prefix" '
|
||||
$0 ~ "^[[:space:]]*set\\(" set_name "([[:space:]]|$)" {
|
||||
in_list = 1
|
||||
next
|
||||
}
|
||||
in_list && /^[[:space:]]*\)/ {
|
||||
exit
|
||||
}
|
||||
in_list {
|
||||
line = $0
|
||||
sub(/^[[:space:]]*/, "", line)
|
||||
sub(/[[:space:]]*$/, "", line)
|
||||
if (line == "") {
|
||||
next
|
||||
}
|
||||
sub(/^\$\{CMAKE_CURRENT_SOURCE_DIR\}\//, "core/", line)
|
||||
if (line !~ /^core\// && relative_prefix != "") {
|
||||
line = relative_prefix line
|
||||
}
|
||||
print line
|
||||
}
|
||||
' core/CMakeLists.txt
|
||||
Reference in New Issue
Block a user