Skip to content

Fix sed command to escape hash in LANGUAGES assignment - #4706

Open
smoe wants to merge 1 commit into
masterfrom
smoe-patch-1
Open

smoe wants to merge 1 commit into
masterfrom
smoe-patch-1

Conversation

@smoe

@smoe smoe commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Updated sed expression to escape hash character for compatibility across versions of GNU make.
It is not necessarily the LANGUAGES assignment per se but the combination with then following echo in the line below.
It is not observed for all versions of Make as it seems. The stable branch does not have this sed expression.

Updated sed expression to escape hash character for compatibility across versions of GNU make.
Comment thread docs/src/Submakefile
# The following line determines for the Makefile what languages should be addressed.
# Edit the file po4a.cfg in this source tree to adjust.
LANGUAGES := $(strip $(shell sed -e's/#.*//' < $(DOC_DIR)/po4a.cfg | grep '^\[po4a_langs\]' | cut -d" " -f2-))
# The escape of the hash in the sed expression prevents an interpretation as a comment by some versions of GNU make.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which version(s)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally ran into this on macOS 27.0.1 with Apple's version of GNU make 3.81:

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

I presume this was shipping with Xcode. Weird that this is still the x86 variant. Anyway.

The version shipping with brew did not have that problem.

$ /opt/homebrew/bin/gmake --version
GNU Make 4.4.1
Built for aarch64-apple-darwin27.0.0
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a meta-level, I am trying to find a way to contribute from where my current routine is residing, and this is on a mac. I do not expect the mac to start controlling any serious hardware in real-time, but I do expect it to be capable to communicate with LinuxCNC controllers. So, I now just want to see how far the current code base carries me. And if there are any low-hanging fruits the improve the compatibility of LinuxCNC then I hope to address these before the release branches.

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