1 # Copyright (C) 2003-2024 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 package Automake
::ItemDef
;
20 use warnings FATAL
=> 'all';
26 Automake::ItemDef - base class for Automake::VarDef and Automake::RuleDef
34 =item C<my $def = Automake::new ($comment, $location, $owner)>
36 Create a new Makefile-item definition.
38 C<$comment> is any comment preceding the definition. (Because
39 Automake reorders items in the output, it also tries to carry comments
42 C<$location> is the place where the definition occurred, it should be
43 an instance of L<Automake::Location>.
45 C<$owner> specifies who owns the rule.
51 my ($class, $comment, $location, $owner) = @_;
55 location
=> $location,
63 =item C<$def-E<gt>comment>
65 =item C<$def-E<gt>location>
67 =item C<$def-E<gt>owner>
69 Accessors to the various constituents of an C<ItemDef>. See the
70 documentation of C<new>'s arguments for a description of these.
77 return $self->{'comment'};
83 return $self->{'location'};
89 return $self->{'owner'};
94 L<Automake::VarDef>, and L<Automake::RuleDef>.