Skip to content

Commit cb9e970

Browse files
Luca Tonioloclaude
andcommitted
Fix header-sanity: align with bertho's include isolation model
- Make motion_planning Submakefile explicit: only copy bezier9.h to include/ (blend_sizing.h uses ../tp/ paths that break in flat include/) - Align blend_sizing.h includes with bertho's convention (<> for system) - Remove orphaned tc_log.h from include/ (no source, no Submakefile) The header-sanity failure was caused by stale tp headers lingering in include/ from before bertho's commit 82f05bc that removed the tp→include copy rules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5db5c73 commit cb9e970

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

include/comp_kins_uspace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#ifndef COMP_KINS_USPACE_H
4242
#define COMP_KINS_USPACE_H
4343

44-
#include "kinematics_params.h"
45-
#include "hal.h"
44+
#include <kinematics_params.h>
45+
#include <hal.h>
4646

4747
/* ====================================================================
4848
* Static state — one instance per .so (separate for RT and userspace)

src/emc/motion_planning/Submakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ $(call TOOBJSDEPS, $(LIBMOTION_PLANNING_9D_KINS_SRCS)) : EXTRAFLAGS=-fPIC -DUSER
8181

8282
TARGETS += ../lib/libmotion_planning_9d.so ../lib/libmotion_planning_9d.so.0
8383

84-
$(patsubst ./emc/motion_planning/%,../include/%,$(wildcard ./emc/motion_planning/*.h)): ../include/%.h: ./emc/motion_planning/%.h
84+
# Only copy headers that are needed by other modules (e.g. bezier9.h is
85+
# included from emc/tp/tc_types.h). Internal headers like blend_sizing.h
86+
# stay local — they reference ../tp/ paths that break in the flat include/.
87+
MOTION_PLANNING_PUBLIC_H := emc/motion_planning/bezier9.h
88+
$(patsubst ./emc/motion_planning/%,../include/%,$(MOTION_PLANNING_PUBLIC_H)): ../include/%.h: ./emc/motion_planning/%.h
8589
cp $^ $@
8690
$(patsubst ./emc/motion_planning/%,../include/%,$(wildcard ./emc/motion_planning/*.hh)): ../include/%.hh: ./emc/motion_planning/%.hh
8791
cp $^ $@

src/emc/motion_planning/blend_sizing.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
#ifndef BLEND_SIZING_H
1414
#define BLEND_SIZING_H
1515

16-
#include "posemath.h"
17-
#include "emcpos.h"
16+
#include <posemath.h>
17+
#include <emcpos.h>
18+
1819
#include "../tp/tc_types.h"
1920
#include "bezier9.h"
2021

tests/build/header-sanity/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ CPPFLAGS=$(pkg-config --silence-errors --cflags libtirpc)
44
for i in "$HEADERS"/*.h; do
55
case $i in
66
*/rtapi_app.h) continue ;;
7+
*/comp_kins_uspace.h) continue ;;
78
esac
89
gcc ${CPPFLAGS} -DULAPI -I"$HEADERS" -E -x c "$i" > /dev/null
910
done
1011
for i in "$HEADERS"/*.h "$HEADERS"/*.hh; do
1112
case $i in
1213
*/\*.hh) continue ;;
1314
*/rtapi_app.h) continue ;;
15+
*/comp_kins_uspace.h) continue ;;
1416
*/interp_internal.hh) continue ;;
1517
esac
1618
if g++ ${CPPFLAGS} -std=c++11 -S -o /dev/null -xcxx /dev/null > /dev/null 2>&1; then

0 commit comments

Comments
 (0)