summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/ocamldoc/remove_DEBUG
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/ocamldoc/remove_DEBUG')
-rwxr-xr-xocaml-binary-annot/ocamldoc/remove_DEBUG22
1 files changed, 22 insertions, 0 deletions
diff --git a/ocaml-binary-annot/ocamldoc/remove_DEBUG b/ocaml-binary-annot/ocamldoc/remove_DEBUG
new file mode 100755
index 0000000000..78b11e6128
--- /dev/null
+++ b/ocaml-binary-annot/ocamldoc/remove_DEBUG
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+#(***********************************************************************)
+#(* OCamldoc *)
+#(* *)
+#(* Damien Doligez, projet Moscova, INRIA Rocquencourt *)
+#(* *)
+#(* Copyright 2003 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. *)
+#(* *)
+#(***********************************************************************)
+
+# $Id$
+
+# usage: remove_DEBUG <file>
+# remove from <file> every line that contains the string "DEBUG",
+# respecting the cpp # line annotation conventions
+
+echo "# 1 \"$1\""
+LC_ALL=C sed -e '/DEBUG/c\
+(* DEBUG statement removed *)' "$1"