Codebase list dh-octave / debian/1.2.2 dh_octave_clean
debian/1.2.2

Tree @debian/1.2.2 (Download .tar.gz)

dh_octave_clean @debian/1.2.2raw · history · blame

#!/usr/bin/perl -w

# Copyright © 2018 Rafael Laboissière <rafael@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

=encoding utf8

=head1 NAME

dh_octave_clean - clean files from Octave-Forge package build

=cut

use strict;
use File::Path;
use Debian::Debhelper::Dh_Lib;

init ();

=head1 SYNOPSIS

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

=head1 DESCRIPTION

B<dh_octave_clean> cleans files generated by the building of
an Octave-Forge package.  It cleans files F<global-list> and
F<local-list> created automatically.

=cut

unlink ("global-list");
unlink ("local-list");

=pod

It also cleans any F<inst/*-api-v*>, F<src/*.o>, F<src/*.oct> and
F<src/*-tst> files left over by the build process.

=cut

rmtree $_ foreach glob "inst/*-api-v*";
unlink $_ foreach glob "src/*.o";
unlink $_ foreach glob "src/*.oct";
unlink $_ foreach glob "src/*-tst";

=pod

Finally, it runs B<make clean> in the F<src> directory, if it exists, in
order to do further cleaning.

=cut

complex_doit ("make -k -C src clean || true");

=head1 SEE ALSO

L<debhelper(7)>, L<dh(1)>, L<dh_octave_substvar(1)>, L<dh_octave_check(1)>,
L<dh_octave_version(1)>, L<dh_octave_changelogs(1)>, L<dh_octave_examples(1)>

This program is meant to be used together with debhelper for Debian
packages derived from Octave-Forge packages.
It is part of the Debhelper octave build system, enabled by the
--buildsystem option to dh_auto_clean (or globally).
It is NOT enabled by the dh sequence provided by the same package.

=head1 AUTHOR

Rafael Laboissière <rafael@debian.org>

=cut

exit;