make contrib issues on macOS #4191

Closed
opened 2025-11-26 20:57:59 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @quinncomendant on GitHub (Oct 2, 2017).

Originally assigned to: @nodiscc on GitHub.

make contrib doesn't work on macOS. There are two issues that involve macOS and other BSD-derived versions of sed:

  1. sed -i requires specifying an extension, even if blank. Use this: sed -i ''.
  2. sed doesn't accept \t as a notation for the TAB character. This works for bash shells: $'s/\t/ | /g'

Putting this together, the sed command in the contrib command should be:

sed -i '' $'s/\t/ | /g' AUTHORS.md
Originally created by @quinncomendant on GitHub (Oct 2, 2017). Originally assigned to: @nodiscc on GitHub. `make contrib` doesn't work on macOS. There are two issues that *involve macOS and other BSD-derived versions of `sed`*: 1. `sed -i` requires specifying an extension, even if blank. Use this: `sed -i ''`. 2. `sed` doesn't accept `\t` as a notation for the TAB character. This works for bash shells: `$'s/\t/ | /g'` Putting this together, the sed command in the `contrib` command should be: sed -i '' $'s/\t/ | /g' AUTHORS.md
GiteaMirror added the toolsfix labels 2025-11-26 20:57:59 -06:00
Author
Owner

@Kickball commented on GitHub (Oct 3, 2017):

@nodiscc I am not familiar with bash/makefiles, I am happy with this change if you are.

@quinncomendant thank you for highlighting this issue.

@Kickball commented on GitHub (Oct 3, 2017): @nodiscc I am not familiar with bash/makefiles, I am happy with this change if you are. @quinncomendant thank you for highlighting this issue.
Author
Owner

@nodiscc commented on GitHub (Oct 4, 2017):

@quinncomendant Thank you for raising this. I have tried applying your change, and am getting an error (using GNU Bash 4.4.12 and GNU sed 4.4 on Debian):

$ make contrib 
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
Makefile:33: recipe for target 'contrib' failed
make: *** [contrib] Error 1

Do you know of a way to make this work on all platforms?

@nodiscc commented on GitHub (Oct 4, 2017): @quinncomendant Thank you for raising this. I have tried applying your change, and am getting an error (using GNU Bash 4.4.12 and GNU sed 4.4 on Debian): ``` $ make contrib /bin/bash: -c: line 0: unexpected EOF while looking for matching `'' /bin/bash: -c: line 1: syntax error: unexpected end of file Makefile:33: recipe for target 'contrib' failed make: *** [contrib] Error 1 ``` Do you know of a way to make this work on all platforms?
Author
Owner

@nodiscc commented on GitHub (Mar 10, 2019):

The makefile only supports GNU Bash.

@nodiscc commented on GitHub (Mar 10, 2019): The makefile only supports GNU Bash.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-selfhosted#4191