Debian Codegraph @

dh_octave_clean

raw
1 #!/usr/bin/perl -w
2
3 # Copyright © 2018 Rafael Laboissière <[email protected]>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, see <https://www.gnu.org/licenses/>.
17
18 =encoding utf8
19
20 =head1 NAME
21
22 dh_octave_clean - clean files from Octave add-on package build
23
24 =cut
25
26 use strict;
27 use File::Path;
28 use Debian::Debhelper::Dh_Lib;
29
30 init ();
31
32 =head1 SYNOPSIS
33
34 B<dh_octave_clean> [S<I<debhelper options>>]
35
36 =head1 DESCRIPTION
37
38 B<dh_octave_clean> cleans files generated by the building of
39 an Octave add-on package. It cleans files F<global-list> and
40 F<local-list> created automatically.
41
42 =cut
43
44 unlink ("global-list");
45 unlink ("local-list");
46
47 =pod
48
49 It also cleans any F<inst/*-api-v*>, F<src/*.o>, F<src/*.oct> and
50 F<src/*-tst> files left over by the build process.
51
52 =cut
53
54 rmtree $_ foreach glob "inst/*-api-v*";
55 unlink $_ foreach glob "src/*.o";
56 unlink $_ foreach glob "src/*.oct";
57 unlink $_ foreach glob "src/*-tst";
58
59 =pod
60
61 Finally, it runs both B<make clean> and B<make distclean> in both the
62 top-level and the F<src> directory, if it exists, in order to do
63 further cleaning.
64
65 =cut
66
67 complex_doit ("make -k clean distclean || true");
68 complex_doit ("make -k -C src clean distclean || true");
69
70 =head1 SEE ALSO
71
72 L<debhelper(7)>, L<dh(1)>, L<dh_octave_substvar(1)>, L<dh_octave_check(1)>,
73 L<dh_octave_version(1)>, L<dh_octave_changelogs(1)>, L<dh_octave_examples(1)>
74
75 This program is meant to be used together with debhelper for Debian
76 packages derived from Octave add-on packages.
77 It is part of the Debhelper octave build system, enabled by the
78 --buildsystem option to dh_auto_clean (or globally).
79 It is NOT enabled by the dh sequence provided by the same package.
80
81 =head1 AUTHOR
82
83 Rafael Laboissière <[email protected]>
84
85 =cut
86
87 exit;
88
89 # Local Variables:
90 # indent-tabs-mode: nil
91 # tab-width: 4
92 # End: