Update autoconf to version 2.61
[msysgit.git] / share / autoconf / Autom4te / Request.pm
blobf6e0332f6fab6ba5667c571e117fb20d0b17181d
1 # autoconf -- create `configure' using m4 macros
2 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 # 02110-1301, USA.
19 package Autom4te::Request;
21 =head1 NAME
23 Autom4te::Request - a single m4 run request
25 =head1 SYNOPSIS
27 use Autom4te::Request;
29 =head1 DESCRIPTION
31 This perl module provides various general purpose support functions
32 used in several executables of the Autoconf and Automake packages.
34 =cut
36 use strict;
37 use Autom4te::Struct;
38 use Carp;
39 use Data::Dumper;
41 struct
43 # The key of the cache files.
44 'id' => "\$",
45 # True iff %MACRO contains all the macros we want to trace.
46 'valid' => "\$",
47 # The include path.
48 'path' => '@',
49 # The set of input files.
50 'input' => '@',
51 # The set of macros currently traced.
52 'macro' => '%',
56 # Serialize a request or all the current requests.
57 sub marshall($)
59 my ($caller) = @_;
60 my $res = '';
62 # CALLER is an object: instance method.
63 my $marshall = Data::Dumper->new ([$caller]);
64 $marshall->Indent(2)->Terse(0);
65 $res = $marshall->Dump . "\n";
67 return $res;
71 # includes_p ($SELF, @MACRO)
72 # --------------------------
73 # Does this request covers all the @MACRO.
74 sub includes_p
76 my ($self, @macro) = @_;
78 foreach (@macro)
80 return 0
81 if ! exists ${$self->macro}{$_};
83 return 1;
87 =head1 SEE ALSO
89 L<Autom4te::C4che>
91 =head1 HISTORY
93 Written by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
95 =cut
99 1; # for require
101 ### Setup "GNU" style for perl-mode and cperl-mode.
102 ## Local Variables:
103 ## perl-indent-level: 2
104 ## perl-continued-statement-offset: 2
105 ## perl-continued-brace-offset: 0
106 ## perl-brace-offset: 0
107 ## perl-brace-imaginary-offset: 0
108 ## perl-label-offset: -2
109 ## cperl-indent-level: 2
110 ## cperl-brace-offset: 0
111 ## cperl-continued-brace-offset: 0
112 ## cperl-label-offset: -2
113 ## cperl-extra-newline-before-brace: t
114 ## cperl-merge-trailing-else: nil
115 ## cperl-continued-statement-offset: 2
116 ## End: