forked from rescript-lang/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove_DEBUG
executable file
·24 lines (21 loc) · 1.27 KB
/
remove_DEBUG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
#**************************************************************************
#* *
#* OCaml *
#* *
#* 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 GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
# 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"