File: | /usr/local/share/automake-1.11/Automake/RuleDef.pm |
Coverage: | 67.4% |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
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, see <http://www.gnu.org/licenses/>. | ||||||
15 | |||||||
16 | package Automake::RuleDef; | ||||||
17 | 1 1 1 | 5 1 4 | use strict; | ||||
18 | 1 1 1 | 3 1 3 | use Carp; | ||||
19 | 1 1 1 | 7 3 4 | use Automake::ChannelDefs; | ||||
20 | 1 1 1 | 4 1 3 | use Automake::ItemDef; | ||||
21 | |||||||
22 | require Exporter; | ||||||
23 | 1 1 1 | 3 2 3 | use vars '@ISA', '@EXPORT'; | ||||
24 | @ISA = qw/Automake::ItemDef Exporter/; | ||||||
25 | @EXPORT = qw (&RULE_AUTOMAKE &RULE_USER); | ||||||
26 | |||||||
27 - 48 | =head1 NAME Automake::RuleDef - a class for rule definitions =head1 SYNOPSIS use Automake::RuleDef; use Automake::Location; =head1 DESCRIPTION This class gathers data related to one Makefile-rule definition. =head2 Constants =over 4 =item C<RULE_AUTOMAKE>, C<RULE_USER> Possible owners for rules. =cut | ||||||
49 | |||||||
50 | 1 1 1 | 4 1 4 | use constant RULE_AUTOMAKE => 0; # Rule defined by Automake. | ||||
51 | 1 1 1 | 3 1 32 | use constant RULE_USER => 1; # Rule defined in the user's Makefile.am. | ||||
52 | |||||||
53 | sub new ($$$$$) | ||||||
54 | { | ||||||
55 | 0 | 1 | my ($class, $name, $comment, $location, $owner, $source) = @_; | ||||
56 | |||||||
57 | 0 | my $self = Automake::ItemDef::new ($class, $comment, $location, $owner); | |||||
58 | 0 | $self->{'source'} = $source; | |||||
59 | 0 | $self->{'name'} = $name; | |||||
60 | 0 | return $self; | |||||
61 | } | ||||||
62 | |||||||
63 | sub source ($) | ||||||
64 | { | ||||||
65 | 0 | 0 | my ($self) = @_; | ||||
66 | 0 | return $self->{'source'}; | |||||
67 | } | ||||||
68 | |||||||
69 | sub name ($) | ||||||
70 | { | ||||||
71 | 0 | 0 | my ($self) = @_; | ||||
72 | 0 | return $self->{'name'}; | |||||
73 | } | ||||||
74 | |||||||
75 | =back | ||||||
76 | |||||||
77 - 81 | =head1 SEE ALSO L<Automake::Rule>, L<Automake::ItemDef>. =cut | ||||||
82 | |||||||
83 | 1; | ||||||
84 | |||||||
85 | ### Setup "GNU" style for perl-mode and cperl-mode. | ||||||
86 | ## Local Variables: | ||||||
87 | ## perl-indent-level: 2 | ||||||
88 | ## perl-continued-statement-offset: 2 | ||||||
89 | ## perl-continued-brace-offset: 0 | ||||||
90 | ## perl-brace-offset: 0 | ||||||
91 | ## perl-brace-imaginary-offset: 0 | ||||||
92 | ## perl-label-offset: -2 | ||||||
93 | ## cperl-indent-level: 2 | ||||||
94 | ## cperl-brace-offset: 0 | ||||||
95 | ## cperl-continued-brace-offset: 0 | ||||||
96 | ## cperl-label-offset: -2 | ||||||
97 | ## cperl-extra-newline-before-brace: t | ||||||
98 | ## cperl-merge-trailing-else: nil | ||||||
99 | ## cperl-continued-statement-offset: 2 | ||||||
100 | ## End: |