summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorpierreweis <Pierre.Weis@inria.fr>2015-11-12 14:38:00 +0100
committerpierreweis <Pierre.Weis@inria.fr>2015-11-12 14:38:00 +0100
commit97cfe7d88231029464596fb4c38cc2c677c029ed (patch)
treee8695a8879385f1234fa10db9eb6040025ffeff5 /tools
parent468a014650f448b3f68649472e7196fc977f4fa2 (diff)
parent9dfa69e54698842ece80ee0ac11aa6ede1f2a1b4 (diff)
downloadocaml-97cfe7d88231029464596fb4c38cc2c677c029ed.tar.gz
Merge branch 'trunk' of ssh://github.com/ocaml/ocaml into trunk
Diffstat (limited to 'tools')
-rw-r--r--tools/.ignore27
-rwxr-xr-xtools/check-typo37
-rwxr-xr-xtools/setignore44
3 files changed, 18 insertions, 90 deletions
diff --git a/tools/.ignore b/tools/.ignore
deleted file mode 100644
index 94fac02fbc..0000000000
--- a/tools/.ignore
+++ /dev/null
@@ -1,27 +0,0 @@
-ocamldep
-ocamldep.opt
-ocamldep.bak
-ocamlprof
-opnames.ml
-dumpobj
-dumpapprox
-objinfo
-cvt_emit
-cvt_emit.bak
-cvt_emit.ml
-ocamlcp
-ocamloptp
-ocamlmktop
-primreq
-ocamldumpobj
-keywords
-lexer299.ml
-ocaml299to3
-ocamlmklib
-ocamlmklibconfig.ml
-lexer301.ml
-scrapelabels
-addlabels
-objinfo_helper
-read_cmt
-read_cmt.opt
diff --git a/tools/check-typo b/tools/check-typo
index a28e4dc153..28a778cb77 100755
--- a/tools/check-typo
+++ b/tools/check-typo
@@ -27,13 +27,13 @@
# - presence of a copyright header (missing-header)
# - absence of a leftover "$Id" string (svn-keyword)
-# Exceptions are handled with a SVN property: "ocaml:typo".
+# Exceptions are handled with a git attribute: "ocaml-typo".
# Its value for a given file is a comma-separated list of rule names,
# which lists the rules that should be disabled for this file.
# The rule names are the ones shown above in parentheses.
# Built-in exceptions:
-# - Any binary file (i.e. with svn:mime-type = application/octet-stream)
+# - Any binary file (i.e. with git attribute "binary")
# is automatically exempt from all the rules.
# - Any file whose name matches one of the following patterns is
# automatically exempt from all rules
@@ -44,7 +44,6 @@
# from the "tabs" rule.
# - Any file whose name matches one of the following patterns is
# automatically exempt from the "missing-header" rule.
-# */.ignore
# *.mlpack
# *.mllib
# *.mltop
@@ -68,21 +67,24 @@
# on the command line (or by default the current directory), and check
# every file therein for compliance to the rules.
-# Directories named .svn and _build (and their contents) are always ignored.
-# This program ignores any file that is not under svn control, unless
+# Directories named .git (and their contents) are always ignored.
+# This program ignores any file that is not under git control, unless
# explicitly given on the command line.
-# If a directory has the SVN property "ocaml:typo" set to "prune",
+# If a directory has the git attribute "ocaml-typo" set to "prune",
# then it and its contents are ignored.
# You can ignore a rule by giving the option -<rule> on the command
# line (before any file names).
+# First prevent i18n from messing up everything.
+export LC_ALL=C
+
# Special case for recursive call from the find command (see IGNORE_DIRS).
case "$1" in
--check-prune)
- case `svn propget ocaml:typo "$2" 2>/dev/null` in
- prune) echo "INFO: pruned directory $2 (ocaml:typo=prune)" >&2; exit 0;;
+ case `git check-attr ocaml-typo "$2" 2>/dev/null` in
+ *prune*) echo "INFO: pruned directory $2 (ocaml-typo=prune)" >&2; exit 0;;
*) exit 3;;
esac;;
esac
@@ -104,8 +106,7 @@ while : ; do
done
IGNORE_DIRS="
- -name .svn -prune -o
- -name _build -prune -o
+ -name .git -prune -o
-type d -exec $0 --check-prune {} ; -prune -o
"
@@ -115,10 +116,8 @@ IGNORE_DIRS="
esac
) | (
while read f; do
- case `svn status "$f" 2>&1` in
- '?'*) is_svn=false;;
- I*) is_svn=false;;
- svn:*"is not a working copy") is_svn=false;;
+ case `git ls-files "$f" 2>&1` in
+ "") is_svn=false;;
*) is_svn=true;;
esac
case "$*" in
@@ -128,16 +127,16 @@ IGNORE_DIRS="
if $is_svn || $is_cmd_line; then :; else continue; fi
svnrules=''
if $is_svn; then
- case `svn propget svn:mime-type "$f"` in
- application/octet-stream) continue;;
+ case `git check-attr binary "$f"` in
+ *'binary: set') continue;;
esac
- svnrules=`svn propget ocaml:typo "$f"`
+ svnrules=`git check-attr ocaml-typo "$f" | sed -e 's/.*: //'`
+ case $svnrules in unspecified) svnrules= ;; esac
fi
rules="$userrules"
add_hd(){ rules="missing-header,$rules"; }
case "$f" in
Makefile*|*/Makefile*) rules="tab,$rules";;
- */.ignore) add_hd;;
*.mlpack|*.mllib|*.mltop|*.odocl|*.itarget|*.clib) add_hd;;
*.reference|*/reference|*/.depend*) continue;;
esac
@@ -230,7 +229,7 @@ IGNORE_DIRS="
for (i in r){
name = r[i];
if (name != "" && !counts[name]){
- err("unused-prop", sprintf("unused [%s] in ocaml:typo", name));
+ err("unused-prop", sprintf("unused [%s] in ocaml-typo", name));
}
}
}
diff --git a/tools/setignore b/tools/setignore
deleted file mode 100755
index 43d37a97dd..0000000000
--- a/tools/setignore
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-#########################################################################
-# #
-# OCaml #
-# #
-# Damien Doligez, projet Gallium, INRIA Rocquencourt #
-# #
-# Copyright 2011 Institut National de Recherche en Informatique et #
-# en Automatique. All rights reserved. This file is distributed #
-# under the terms of the Q Public License version 1.0. #
-# #
-#########################################################################
-
-(
- cat <<EOF
-*.o
-*.a
-*.so
-*.obj
-*.lib
-*.dll
-
-*.cm[ioxat]
-*.cmx[as]
-*.cmti
-*.annot
-
-*.result
-*.byte
-*.native
-program
-*.exe
-*.exe.manifest
-
-.depend
-.depend.nt
-.DS_Store
-
-EOF
-
- if [ -f .ignore ]; then cat .ignore; fi
-
-) | svn propset svn:ignore -F - .