Repository navigation
build: parse ZLOG_VERSION without '#' so make 3.81 works - #377
Merged
Merged
Conversation
Before GNU make 4.3, a '#' inside a function call such as $(shell ...) still starts a comment. make 3.81, the default on macOS, therefore cut the version line at the '#' of '^#define' and failed with "unterminated call to function 'shell': missing ')'". Match '.define' instead, and use [[:space:]] rather than [ \t], which BSD sed does not read as a tab. Fixes HardySimpson#376 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS ships GNU make 3.81, which no other job uses. It still treats a '#' inside $(shell ...) as a comment, which broke the makefile build there (HardySimpson#376) while every CI job passed. Build the library and the tests with /usr/bin/make once, in the Release entry of the matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before GNU make 4.3, a
#inside a function call such as$(shell ...)still starts a comment. make 3.81, the default on macOS, therefore cuts the version line insrc/Makefileat the#of^#defineand fails with:The top level
Makefileonly runsmakeinsrc, so building from the root fails the same way.This PR matches
.defineinstead, so the line has no#and parses the same with every make version. It also uses[[:space:]]instead of[ \t], because BSD sed doesn't read\tas a tab inside brackets.\#isn't used because make 4.3 and later pass the backslash through to the shell.Tested with GNU make 4.3 on Linux: the build produces
libzlog.so.1.2.20andlibzlog.so.1.2as before. Not yet tested with make 3.81; I've asked the reporter to try it.Fixes #376
🤖 Generated with Claude Code