#!/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: remove_DEBUG,v 1.5 2005/03/25 23:56:31 kswadi Exp $

# 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/s/.*//' "$1"

# #sed -e '/DEBUG/s/.*//' "$1"
# grep -v DEBUG $1
#
# # the above sed command does not work with sed v 4.0.8
# # the command succeeds, but incorrect output makes build fail when
# # accents are encountered
# # grep ensures compatibility with new versions of sed
