Skip to content

src: include exported headers with angle brackets where they are used - #4448

Merged
BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:include-brackets
Aug 22, 2026
Merged

src: include exported headers with angle brackets where they are used#4448
BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:include-brackets

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

@BsAtHome The include-type half of #4375, split out as you asked. The check stays there.

The build copies every SRCHEADERS entry into include/, so an exported header exists twice, the source under src/ and the copy modules compile against. A quoted include searches the includer's own directory before the -I path and an angled include does not, so the two forms can reach different copies of the same header and both compile.

An exported header keeps the quoted form so it still finds its siblings once it lands in include/, and so does its implementation, which wants the source rather than a stale export. The seven files here are users, and build out of tree where only the exported copies exist.

Comment thread src/hal/hal.hh
@BsAtHome

Copy link
Copy Markdown
Contributor

The inifile.hh fixes reminds me of the fact that liblinuxcncini.so should also be moved outside the emc tree. It is a separate library stuff links against. Yet another cleanup ;-)

The build copies every SRCHEADERS entry into include/, so an exported
header exists twice: the source under src/ and the copy modules compile
against.  A quoted include searches the includer's own directory before
the -I path, an angled include does not, so the two forms can reach
different copies of the same header and both compile.

An exported header travels to include/ and takes its siblings with it,
so it keeps the quoted form and finds them wherever it lands, and so
does its implementation, wanting the source rather than a stale export.
The files changed here are users, and build out of tree where only the
exported copies exist.
@BsAtHome
BsAtHome merged commit 5c41560 into LinuxCNC:master Aug 22, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants