#!/usr/bin/perl -w

# Copyright © 2009 Mehdi Dogguy <mehdi@debian.org>
# Copyright © 2010 Stéphane Glondu <glondu@debian.org>
#
# This is free software, you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 or above
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA

=head1 NAME

dh_ocamlclean - Clean files generated by dh_ocamlinit.

=cut

use strict;
use Debian::Debhelper::Dh_Lib;
init();

=head1 SYNOPSIS

B<dh_ocamlclean> [S<I<debhelper options>>]

=head1 DESCRIPTION

dh_ocamlinit cleans files generated by dh_ocamlinit from present
debian/*.in ones.

=cut

my @ocaml_in_files = split /\n/,
`find debian/ -type f -name "*.in" -not \\( -name control\.in \\) | sed 's/.in\$//'`;

inhibit_log();
complex_doit("rm -f ocamlinit-stamp @ocaml_in_files");
exit;

=head1 SEE ALSO

L<debhelper(7)>, L<dh(1)>, L<dh_ocaml(1)>, L<dh_ocamlinit(1)>

This program is meant to be used together with debhelper.

=head1 AUTHOR

Mehdi Dogguy <mehdi@debian.org>

=cut
