summaryrefslogtreecommitdiff
path: root/ocamldoc/remove_DEBUG
blob: bca6ba049d5b565c7b21523c316310461908d821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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.               *)
#(*                                                                     *)
#(***********************************************************************)

# 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"