Make native TP oracle build reproducible

This commit is contained in:
2026-08-31 20:17:09 +08:00
parent 6015293ee9
commit bbdfad8364
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
SOURCE_ROOT="${ROOT}/linuxcnc"
PATCH_FILE="${ROOT}/patches/linuxcnc/0001-export-native-task-heartbeat.patch"
if ! rg -q 'task_heartbeat' "${SOURCE_ROOT}/src/emc/usr_intf/axis/extensions/emcmodule.cc"; then
patch --forward --batch -p1 -d "${SOURCE_ROOT}" < "${PATCH_FILE}"
fi
make -C "${SOURCE_ROOT}/src" ../lib/python/linuxcnc.so ../bin/milltask
printf '%s\n' 'LinuxCNC native oracle build ready: source linuxcnc.so + milltask'