| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# autoconf -- create 'configure' using m4 macros |
|
2
|
|
|
|
|
|
|
# Copyright (C) 2001-2003, 2009-2017, 2020-2023 Free Software |
|
3
|
|
|
|
|
|
|
# Foundation, Inc. |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify |
|
6
|
|
|
|
|
|
|
# it under the terms of the GNU General Public License as published by |
|
7
|
|
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or |
|
8
|
|
|
|
|
|
|
# (at your option) any later version. |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful, |
|
11
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13
|
|
|
|
|
|
|
# GNU General Public License for more details. |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License |
|
16
|
|
|
|
|
|
|
# along with this program. If not, see . |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package Autom4te::Request; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Autom4te::Request - a single m4 run request |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
use Autom4te::Request; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This perl module provides various general purpose support functions |
|
31
|
|
|
|
|
|
|
used in several executables of the Autoconf and Automake packages. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
|
34
|
|
|
|
|
|
|
|
|
35
|
1
|
|
|
1
|
|
19
|
use 5.006; |
|
|
1
|
|
|
|
|
4
|
|
|
36
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
32
|
|
|
37
|
1
|
|
|
1
|
|
4
|
use warnings FATAL => 'all'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
76
|
|
|
38
|
|
|
|
|
|
|
|
|
39
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
94
|
|
|
40
|
1
|
|
|
1
|
|
510
|
use Class::Struct; |
|
|
1
|
|
|
|
|
2356
|
|
|
|
1
|
|
|
|
|
6
|
|
|
41
|
1
|
|
|
1
|
|
180
|
use Data::Dumper; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
249
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
struct |
|
44
|
|
|
|
|
|
|
( |
|
45
|
|
|
|
|
|
|
# The key of the cache files. |
|
46
|
|
|
|
|
|
|
'id' => "\$", |
|
47
|
|
|
|
|
|
|
# True iff %MACRO contains all the macros we want to trace. |
|
48
|
|
|
|
|
|
|
'valid' => "\$", |
|
49
|
|
|
|
|
|
|
# The include path. |
|
50
|
|
|
|
|
|
|
'path' => '@', |
|
51
|
|
|
|
|
|
|
# The set of input files. |
|
52
|
|
|
|
|
|
|
'input' => '@', |
|
53
|
|
|
|
|
|
|
# The set of macros currently traced. |
|
54
|
|
|
|
|
|
|
'macro' => '%', |
|
55
|
|
|
|
|
|
|
); |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
# Serialize a request or all the current requests. |
|
59
|
|
|
|
|
|
|
sub marshall($) |
|
60
|
|
|
|
|
|
|
{ |
|
61
|
0
|
|
|
0
|
0
|
|
my ($caller) = @_; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# CALLER is an object: instance method. |
|
64
|
0
|
|
|
|
|
|
my $marshall = Data::Dumper->new ([$caller]); |
|
65
|
0
|
|
|
|
|
|
$marshall->Indent(2)->Terse(0); |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# The Sortkeys method was added in Data::Dumper 2.12_01, so it is |
|
68
|
|
|
|
|
|
|
# available in 5.8.x and 5.6.2 but not in 5.6.1 or earlier. |
|
69
|
|
|
|
|
|
|
# Ignore failure of method lookup. |
|
70
|
0
|
|
|
|
|
|
eval { $marshall->Sortkeys(1); }; |
|
|
0
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return $marshall->Dump . "\n"; |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
# includes_p ($SELF, @MACRO) |
|
77
|
|
|
|
|
|
|
# -------------------------- |
|
78
|
|
|
|
|
|
|
# Does this request covers all the @MACRO. |
|
79
|
|
|
|
|
|
|
sub includes_p |
|
80
|
|
|
|
|
|
|
{ |
|
81
|
0
|
|
|
0
|
0
|
|
my ($self, @macro) = @_; |
|
82
|
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
foreach (@macro) |
|
84
|
|
|
|
|
|
|
{ |
|
85
|
|
|
|
|
|
|
return 0 |
|
86
|
0
|
0
|
|
|
|
|
if ! exists ${$self->macro}{$_}; |
|
|
0
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
} |
|
88
|
0
|
|
|
|
|
|
return 1; |
|
89
|
|
|
|
|
|
|
} |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 HISTORY |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Written by Akim Demaille EFE. |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=cut |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
1; # for require |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
### Setup "GNU" style for perl-mode and cperl-mode. |
|
107
|
|
|
|
|
|
|
## Local Variables: |
|
108
|
|
|
|
|
|
|
## perl-indent-level: 2 |
|
109
|
|
|
|
|
|
|
## perl-continued-statement-offset: 2 |
|
110
|
|
|
|
|
|
|
## perl-continued-brace-offset: 0 |
|
111
|
|
|
|
|
|
|
## perl-brace-offset: 0 |
|
112
|
|
|
|
|
|
|
## perl-brace-imaginary-offset: 0 |
|
113
|
|
|
|
|
|
|
## perl-label-offset: -2 |
|
114
|
|
|
|
|
|
|
## cperl-indent-level: 2 |
|
115
|
|
|
|
|
|
|
## cperl-brace-offset: 0 |
|
116
|
|
|
|
|
|
|
## cperl-continued-brace-offset: 0 |
|
117
|
|
|
|
|
|
|
## cperl-label-offset: -2 |
|
118
|
|
|
|
|
|
|
## cperl-extra-newline-before-brace: t |
|
119
|
|
|
|
|
|
|
## cperl-merge-trailing-else: nil |
|
120
|
|
|
|
|
|
|
## cperl-continued-statement-offset: 2 |
|
121
|
|
|
|
|
|
|
## End: |