[m-rev.] diff: fix problem generating manual pages on Mac OS X

Julien Fischer jfischer at opturion.com
Tue Jun 4 15:12:44 AEST 2013


Branches: main, 13.05

-----------------------

Fix a problem with generating the manual pages on Mac OS X.

doc/make_manpage:
 	BSD sed has problems with line continuations in some cases.
 	Avoid using them where this is an issue.

Julien.

diff --git a/doc/make_manpage b/doc/make_manpage
index 50b1198..2b2b85c 100755
--- a/doc/make_manpage
+++ b/doc/make_manpage
@@ -28,6 +28,10 @@
  # Each line of the main text must start with a tab.
  # We change the tab to "\&".

+# NOTE: some of the sed expressions below occur on very long lines.
+# This is deliberate, BSD sed has problems handling line continuations in some
+# cases.
+
  program="$1"
  name="`basename $program `"

@@ -56,9 +60,7 @@ $program --help 2>&1 \
  		-e 's/^		/	\\\&	/g' 	\
  		-e 's/^	//' \
  	| sed	\
-		-e '/^.SH "[\/A-Za-z ]*:[ 	]*"/y/\
-abcdefghijklmnopqrstuvwxyz:/\
-ABCDEFGHIJKLMNOPQRSTUVWXYZ /' \
+		-e '/^.SH "[\/A-Za-z ]*:[ 	]*"/y/abcdefghijklmnopqrstuvwxyz:/ABCDEFGHIJKLMNOPQRSTUVWXYZ /' \
  		-e 's/^.SH "USAGE[ 	]*"/.SH "SYNOPSIS"/' \
  	> /tmp/make_manpage$$
  manpage="`cat /tmp/make_manpage$$`"



More information about the reviews mailing list