source: trunk/essentials/sys-devel/automake-1.8/lib/Automake/RuleDef.pm

Last change on this file was 3118, checked in by bird, 18 years ago

automake 1.8.5

File size: 2.3 KB
Line 
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., 59 Temple Place - Suite 330, Boston, MA
16# 02111-1307, USA.
17
18package Automake::RuleDef;
19use strict;
20use Carp;
21use Automake::ChannelDefs;
22use Automake::ItemDef;
23
24require Exporter;
25use vars '@ISA', '@EXPORT';
26@ISA = qw/Automake::ItemDef Exporter/;
27@EXPORT = qw (&RULE_AUTOMAKE &RULE_USER);
28
29=head1 NAME
30
31Automake::RuleDef - a class for rule definitions
32
33=head1 SYNOPSIS
34
35 use Automake::RuleDef;
36 use Automake::Location;
37
38=head1 DESCRIPTION
39
40This 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
48Possible owners for rules.
49
50=cut
51
52use constant RULE_AUTOMAKE => 0; # Rule defined by Automake.
53use constant RULE_USER => 1; # Rule defined in the user's Makefile.am.
54
55sub 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
65sub source ($)
66{
67 my ($self) = @_;
68 return $self->{'source'};
69}
70
71sub name ($)
72{
73 my ($self) = @_;
74 return $self->{'name'};
75}
76
77=back
78
79=head1 SEE ALSO
80
81L<Automake::Rule>, L<Automake::ItemDef>.
82
83=cut
84
851;
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:
Note: See TracBrowser for help on using the repository browser.