summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2017-10-07 15:52:07 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2017-10-07 15:52:07 +0200
commit801993dc8d2782ba83e9dc30e55dfdadd7c6f0f5 (patch)
tree09d972ae3ac5ae812bb1e8d95bf43138ae23c1f2
parent21df1ec6c2d592d4e6d2681384f65d32edb2269e (diff)
downloadocaml-801993dc8d2782ba83e9dc30e55dfdadd7c6f0f5.tar.gz
GPR#931 follow-up: problem with remove_DEBUG sed script under OpenBSD
On OpenBSD this script removes the newline at the end of each line that is transformed. If the next line is a `# lineno "filename"` directive, a syntax error occurs. This commit changes the script to use a sed 's' command instead of a 'c' command. This restores the expected behavior under OpenBSD and seems to make no difference for other systems.
-rwxr-xr-xocamldoc/remove_DEBUG3
1 files changed, 1 insertions, 2 deletions
diff --git a/ocamldoc/remove_DEBUG b/ocamldoc/remove_DEBUG
index 3cb47bb853..0eee2df9f3 100755
--- a/ocamldoc/remove_DEBUG
+++ b/ocamldoc/remove_DEBUG
@@ -20,5 +20,4 @@
# respecting the cpp # line annotation conventions
echo "# 1 \"$1\""
-LC_ALL=C sed -e '/DEBUG/c\
-(* DEBUG statement removed *)' "$1"
+LC_ALL=C sed -e '/DEBUG/s/^.*$/(* DEBUG statement removed *)/' "$1"