diff options
author | David Allsopp <david.allsopp@metastack.com> | 2017-03-19 12:47:07 +0000 |
---|---|---|
committer | David Allsopp <david.allsopp@metastack.com> | 2017-04-13 14:17:28 +0200 |
commit | 03015766857e6f057b7c8f8150f451236c909d63 (patch) | |
tree | 3465b663442b7b5c97de9bdf9126e69409f1bf15 /tools | |
parent | 9f25a61171e5133ad7fcde7ced72b838b49cec9a (diff) | |
download | ocaml-03015766857e6f057b7c8f8150f451236c909d63.tar.gz |
Fix \r problems on recent Cygwins
The Cygwin packages for awk, grep and sed were updated on 20 February
2017 so that they no longer automatically strip \r characters on binary
mounts. This affects the OCaml build system in a few places, requiring
the addition of a few tr calls.
References:
* https://cygwin.com/ml/cygwin/2017-02/msg00152.html
* https://cygwin.com/ml/cygwin/2017-02/msg00189.html
* https://cygwin.com/ml/cygwin/2017-02/msg00188.html
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/check-typo | 2 | ||||
-rwxr-xr-x | tools/make-version-header.sh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/check-typo b/tools/check-typo index a19943a6c0..550ce2524a 100755 --- a/tools/check-typo +++ b/tools/check-typo @@ -159,7 +159,7 @@ IGNORE_DIRS=" ocamldoc/*|*/ocamldoc/*) rules="long-line,$rules";; esac - (cat "$f"; echo) \ + (cat "$f" | tr -d '\r'; echo) \ | awk -v rules="$rules" -v svnrules="$svnrules" -v file="$f" \ ' function err(name, msg) { diff --git a/tools/make-version-header.sh b/tools/make-version-header.sh index 7b37298e44..ce3b70c67c 100755 --- a/tools/make-version-header.sh +++ b/tools/make-version-header.sh @@ -32,8 +32,8 @@ # be used. case $# in - 0) version="`ocamlc -v | sed -n -e 's/.*version //p'`";; - 1) version="`sed -e 1q $1`";; + 0) version="`ocamlc -v | tr -d '\r' | sed -n -e 's/.*version //p'`";; + 1) version="`sed -e 1q $1 | tr -d '\r'`";; *) echo "usage: make-version-header.sh [version-file]" >&2 exit 2;; esac |