1 | # Copyright (C) 2003 Free Software Foundation, Inc.
|
---|
2 |
|
---|
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)
|
---|
6 | # any later version.
|
---|
7 |
|
---|
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.
|
---|
12 |
|
---|
13 | # You should have received a copy of the GNU General Public License
|
---|
14 | # along with this program; if not, write to the Free Software
|
---|
15 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
---|
16 | # 02110-1301, USA.
|
---|
17 |
|
---|
18 | package Automake::RuleDef;
|
---|
19 | use strict;
|
---|
20 | use Carp;
|
---|
21 | use Automake::ChannelDefs;
|
---|
22 | use Automake::ItemDef;
|
---|
23 |
|
---|
24 | require Exporter;
|
---|
25 | use vars '@ISA', '@EXPORT';
|
---|
26 | @ISA = qw/Automake::ItemDef Exporter/;
|
---|
27 | @EXPORT = qw (&RULE_AUTOMAKE &RULE_USER);
|
---|
28 |
|
---|
29 | =head1 NAME
|
---|
30 |
|
---|
31 | Automake::RuleDef - a class for rule definitions
|
---|
32 |
|
---|
33 | =head1 SYNOPSIS
|
---|
34 |
|
---|
35 | use Automake::RuleDef;
|
---|
36 | use Automake::Location;
|
---|
37 |
|
---|
38 | =head1 DESCRIPTION
|
---|
39 |
|
---|
40 | This class gather data related to one Makefile-rule definition.
|
---|
41 |
|
---|
42 | =head2 Constants
|
---|
43 |
|
---|
44 | =over 4
|
---|
45 |
|
---|
46 | =item C<RULE_AUTOMAKE>, C<RULE_USER>
|
---|
47 |
|
---|
48 | Possible owners for rules.
|
---|
49 |
|
---|
50 | =cut
|
---|
51 |
|
---|
52 | use constant RULE_AUTOMAKE => 0; # Rule defined by Automake.
|
---|
53 | use constant RULE_USER => 1; # Rule defined in the user's Makefile.am.
|
---|
54 |
|
---|
55 | sub new ($$$$$)
|
---|
56 | {
|
---|
57 | my ($class, $name, $comment, $location, $owner, $source) = @_;
|
---|
58 |
|
---|
59 | my $self = Automake::ItemDef::new ($class, $comment, $location, $owner);
|
---|
60 | $self->{'source'} = $source;
|
---|
61 | $self->{'name'} = $name;
|
---|
62 | return $self;
|
---|
63 | }
|
---|
64 |
|
---|
65 | sub source ($)
|
---|
66 | {
|
---|
67 | my ($self) = @_;
|
---|
68 | return $self->{'source'};
|
---|
69 | }
|
---|
70 |
|
---|
71 | sub name ($)
|
---|
72 | {
|
---|
73 | my ($self) = @_;
|
---|
74 | return $self->{'name'};
|
---|
75 | }
|
---|
76 |
|
---|
77 | =back
|
---|
78 |
|
---|
79 | =head1 SEE ALSO
|
---|
80 |
|
---|
81 | L<Automake::Rule>, L<Automake::ItemDef>.
|
---|
82 |
|
---|
83 | =cut
|
---|
84 |
|
---|
85 | 1;
|
---|
86 |
|
---|
87 | ### Setup "GNU" style for perl-mode and cperl-mode.
|
---|
88 | ## Local Variables:
|
---|
89 | ## perl-indent-level: 2
|
---|
90 | ## perl-continued-statement-offset: 2
|
---|
91 | ## perl-continued-brace-offset: 0
|
---|
92 | ## perl-brace-offset: 0
|
---|
93 | ## perl-brace-imaginary-offset: 0
|
---|
94 | ## perl-label-offset: -2
|
---|
95 | ## cperl-indent-level: 2
|
---|
96 | ## cperl-brace-offset: 0
|
---|
97 | ## cperl-continued-brace-offset: 0
|
---|
98 | ## cperl-label-offset: -2
|
---|
99 | ## cperl-extra-newline-before-brace: t
|
---|
100 | ## cperl-merge-trailing-else: nil
|
---|
101 | ## cperl-continued-statement-offset: 2
|
---|
102 | ## End:
|
---|