Skip to content

Commit cf6522a

Browse files
alexg0claude
andcommitted
docs: use portable sed instead of sed -i for macOS compatibility
`sed -i -e` is GNU sed syntax. BSD sed (macOS) requires `sed -i '' -e` for in-place editing without a backup extension. Using `sed -i -e` on macOS causes `sed: -e: No such file or directory` because BSD sed interprets `-e` as the backup extension argument. Replace all `sed -i` calls with `sed ... > tmp && mv tmp original` which is portable across GNU and BSD sed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e7cae38 commit cf6522a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _ := $(shell test "$(REVDESC)" = "$$(cat .revdesc 2> /dev/null)" ||\
2929
%.texi: %.org .orgconfig .revdesc
3030
@printf "Generating $@\n"
3131
@$(EMACS_ORG) $< $(ORG_EVAL)
32-
@sed -i -e 's//``/g' -e "s/”/''/g" -e '$$a\' $(PKG).texi #'
32+
@sed -e 's//``/g' -e s/”/''/g -e '$$a\' $(PKG).texi > $(PKG).texi.tmp && mv $(PKG).texi.tmp $(PKG).texi #'
3333

3434
%.info: %.texi
3535
@printf "Generating $@\n"
@@ -52,14 +52,14 @@ HTML_FIXUP_MENU = '/<\/body>/i<div id="s-css-s--menu"><\/div>'
5252
%.html: %.texi
5353
@printf "Generating $@\n"
5454
@$(MAKEINFO) --html --no-split $(MANUAL_HTML_ARGS) $<
55-
@sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e $(HTML_FIXUP_MENU) $@
55+
@sed -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e $(HTML_FIXUP_MENU) $@ > $@.tmp && mv $@.tmp $@
5656

5757
%/index.html: %.texi
5858
@printf "Generating $(PKG)/*.html\n"
5959
@rm -rf $(PKG)
6060
@$(MAKEINFO) --html -o $(PKG)/ $(MANUAL_HTML_ARGS) $<
6161
@for f in $$(find $(PKG) -name '*.html') ; do \
62-
sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e $(HTML_FIXUP_MENU) $$f ; \
62+
sed -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e $(HTML_FIXUP_MENU) $$f > $$f.tmp && mv $$f.tmp $$f ; \
6363
done
6464

6565
%.pdf: %.texi

0 commit comments

Comments
 (0)