summaryrefslogtreecommitdiff
path: root/lib/Automake/Errors.pm
blob: 96ddae21c61c5016e434d0b30f10dac9a89b02ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (C) 2018  Free Software Foundation, Inc.

# 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 2
# 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, see <http://www.gnu.org/licenses/>.

package Automake::Errors;

use strict;
use 5.006;

use Automake::Channels;
use Automake::Global;
use Exporter;

use vars '@ISA', '@EXPORT';

@ISA = qw (Exporter);

@EXPORT = qw (err_am err_ac);

=head1 NAME

Automake::Errors - Functions for printing error messages about am and ac
files

=head1 DESCRIPTION

This package provides two methods for printing errors about
C<Makefile.am> and C<configure.ac> files.

=head2 FUNCTIONS

=cut

# _msg_am ($CHANNEL, $MESSAGE, [%OPTIONS])
#---------------------------------------
# Messages about about the current Makefile.am.
sub _msg_am
{
  my ($channel, $msg, %opts) = @_;
  msg $channel, "${am_file}.am", $msg, %opts;
}

# _msg_ac ($CHANNEL, $MESSAGE, [%OPTIONS])
# ---------------------------------------
# Messages about about configure.ac.
sub _msg_ac
{
  my ($channel, $msg, %opts) = @_;
  msg $channel, $configure_ac, $msg, %opts;
}

=item C<err_am ($MESSAGE, [%OPTIONS])>

Uncategorized errors about the current Makefile.am.

=cut

sub err_am
{
  _msg_am ('error', @_);
}

=item C<err_ac ($MESSAGE, [%OPTIONS])>

Uncategorized errors about configure.ac.

=cut

sub err_ac
{
  _msg_ac ('error', @_);
}

=back

=head1 SEE ALSO

L<Automake::Channels>, L<Automake::ChannelDefs>

=cut

1;