| 1 | package Makeutils ; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | Makeutils - MakeMaker utilities | ||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | use Makeutils ; | ||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | Module provides a set of useful utility routines for creating Maefiles and config.h files. | ||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 21 | # USES | ||||||||||||||||||||||||||||||||||||||||||
| 22 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 23 | 1 | ▶ | use strict ; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | use ExtUtils::MakeMaker ; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | ▶ | use Env ; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | ▶ | use Config; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 1 | ▶ | use Cwd 'cwd'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 28 | 1 | ▶ | use File::Basename ; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 29 | 1 | ▶ | use File::Path ; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||
| 32 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 33 | # EXPORTER | ||||||||||||||||||||||||||||||||||||||||||
| 34 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 35 | 1 | require Exporter; | |||||||||||||||||||||||||||||||||||||||||
| 36 | 1 | our @ISA = qw(Exporter); | |||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||
| 38 | 1 | our @EXPORT = qw/ | |||||||||||||||||||||||||||||||||||||||||
| 39 | init | ||||||||||||||||||||||||||||||||||||||||||
| 40 | add_install_progs | ||||||||||||||||||||||||||||||||||||||||||
| 41 | add_defines | ||||||||||||||||||||||||||||||||||||||||||
| 42 | get_makeopts | ||||||||||||||||||||||||||||||||||||||||||
| 43 | process_makeopts | ||||||||||||||||||||||||||||||||||||||||||
| 44 | update_manifest | ||||||||||||||||||||||||||||||||||||||||||
| 45 | add_objects | ||||||||||||||||||||||||||||||||||||||||||
| 46 | add_clibs | ||||||||||||||||||||||||||||||||||||||||||
| 47 | c_try | ||||||||||||||||||||||||||||||||||||||||||
| 48 | c_try_keywords | ||||||||||||||||||||||||||||||||||||||||||
| 49 | c_inline | ||||||||||||||||||||||||||||||||||||||||||
| 50 | have_builtin_expect | ||||||||||||||||||||||||||||||||||||||||||
| 51 | have_lrintf | ||||||||||||||||||||||||||||||||||||||||||
| 52 | c_always_inline | ||||||||||||||||||||||||||||||||||||||||||
| 53 | c_restrict | ||||||||||||||||||||||||||||||||||||||||||
| 54 | c_has_header | ||||||||||||||||||||||||||||||||||||||||||
| 55 | c_has_function | ||||||||||||||||||||||||||||||||||||||||||
| 56 | c_struct_timeval | ||||||||||||||||||||||||||||||||||||||||||
| 57 | check_new_version | ||||||||||||||||||||||||||||||||||||||||||
| 58 | have_h | ||||||||||||||||||||||||||||||||||||||||||
| 59 | have_d | ||||||||||||||||||||||||||||||||||||||||||
| 60 | havent_d | ||||||||||||||||||||||||||||||||||||||||||
| 61 | have_func | ||||||||||||||||||||||||||||||||||||||||||
| 62 | arch_name | ||||||||||||||||||||||||||||||||||||||||||
| 63 | get_config | ||||||||||||||||||||||||||||||||||||||||||
| 64 | get_makemakerdflt | ||||||||||||||||||||||||||||||||||||||||||
| 65 | / ; | ||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 69 | # GLOBALS | ||||||||||||||||||||||||||||||||||||||||||
| 70 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 71 | 1 | our $VERSION = '1.07' ; | |||||||||||||||||||||||||||||||||||||||||
| 72 | 1 | our $DEBUG = 0 ; | |||||||||||||||||||||||||||||||||||||||||
| 73 | 1 | our $UPDATE_MANIFEST = 0 ; | |||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | 1 | our %ModuleInfo ; | |||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||
| 80 | #============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||
| 82 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 83 | sub init | ||||||||||||||||||||||||||||||||||||||||||
| 84 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 85 | 1 | my ($modname) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | 1 | print "(Using Makeutils.pm version $VERSION)\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||
| 89 | 1 | my $name = $modname ; | |||||||||||||||||||||||||||||||||||||||||
| 90 | 1 | ▶ | unless ($name) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | { | ||||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | $name = basename(cwd()); | |||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | $name =~ s|[\-_][\d\.\-]+\z||; | |||||||||||||||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||
| 96 | # eg Linux::DVB::DVBT::TS | ||||||||||||||||||||||||||||||||||||||||||
| 97 | 1 | my $mod = $name ; | |||||||||||||||||||||||||||||||||||||||||
| 98 | 1 | $mod =~ s%\-%::%g ; | |||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||
| 100 | # eg Linux/DVB/DVBT/TS | ||||||||||||||||||||||||||||||||||||||||||
| 101 | 1 | my $modpath = $name ; | |||||||||||||||||||||||||||||||||||||||||
| 102 | 1 | $modpath =~ s%\-%/%g ; | |||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | # eg TS | ||||||||||||||||||||||||||||||||||||||||||
| 105 | 1 | my $root = $name ; | |||||||||||||||||||||||||||||||||||||||||
| 106 | 1 | $root =~ s%.*\-([^-]+)$%$1% ; | |||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | 1 | my $version = ExtUtils::MM->parse_version("lib/$modpath.pm"); | |||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 1 | %ModuleInfo = ( | |||||||||||||||||||||||||||||||||||||||||
| 111 | # eg Linux-DVB-DVBT-TS | ||||||||||||||||||||||||||||||||||||||||||
| 112 | 'name' => $name, | ||||||||||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||||||||||
| 114 | # eg Linux::DVB::DVBT::TS | ||||||||||||||||||||||||||||||||||||||||||
| 115 | 'mod' => $mod, | ||||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||
| 117 | # eg Linux/DVB/DVBT/TS | ||||||||||||||||||||||||||||||||||||||||||
| 118 | 'modpath' => $modpath, | ||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | # eg TS | ||||||||||||||||||||||||||||||||||||||||||
| 121 | 'root' => $root, | ||||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||
| 123 | 'version' => $version, | ||||||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||||||
| 125 | 'programs' => [], | ||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||
| 127 | 'mod_defines' => "", | ||||||||||||||||||||||||||||||||||||||||||
| 128 | 'make_defines' => "", | ||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | ## Flags | ||||||||||||||||||||||||||||||||||||||||||
| 131 | 'CCFLAGS' => '-o $@', | ||||||||||||||||||||||||||||||||||||||||||
| 132 | 'OPTIMIZE' => '-O3', | ||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | # included c-libraries | ||||||||||||||||||||||||||||||||||||||||||
| 135 | 'clibs' => {}, | ||||||||||||||||||||||||||||||||||||||||||
| 136 | 'includes' => "", | ||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||
| 138 | # String "list" of objects | ||||||||||||||||||||||||||||||||||||||||||
| 139 | 'objects' => "$root.o ", | ||||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||
| 141 | # additional objects | ||||||||||||||||||||||||||||||||||||||||||
| 142 | 'obj_list' => [], | ||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | 'config' => {}, | ||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | 'COMMENTS' => {}, | ||||||||||||||||||||||||||||||||||||||||||
| 147 | 'C_TRY' => {}, | ||||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||
| 149 | ) ; | ||||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||
| 151 | 1 | return \%ModuleInfo ; | |||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||
| 154 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 155 | sub add_install_progs | ||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_install_progs: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | my ($basedir, $progs_aref) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | ▶ | if ( (ref($progs_aref) eq 'ARRAY') && @$progs_aref) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $progs_aref eq "ARRAY" and @$progs_aref
MC/DC0%0/2
ref $progs_aref eq "ARRAY" and @$progs_aref
ref $progs_aref eq "ARRAY"
@$progs_aref
Truth table0%0/3
A and B
A= ref $progs_aref eq "ARRAY"B= @$progs_aref
| |||||||||||||||||||||||||||||||||||||||||||
| 160 | { | ||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
grep(($_ eq "-n"), @ARGV) or grep /^LIB=/, @ARGV and not grep(/^INSTALLSCRIPT=/, @ARGV)
grep /^LIB=/, @ARGV and not grep(/^INSTALLSCRIPT=/, @ARGV)
MC/DC0%0/3
grep(($_ eq "-n"), @ARGV) or grep /^LIB=/, @ARGV and not grep(/^INSTALLSCRIPT=/, @ARGV)
grep(($_ eq "-n"), @ARGV)
grep /^LIB=/, @ARGV
not grep(/^INSTALLSCRIPT=/, @ARGV)
Truth table0%0/4
A or B and not(C)
A= grep(($_ eq "-n"), @ARGV)B= grep /^LIB=/, @ARGVC= not grep(/^INSTALLSCRIPT=/, @ARGV)
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | grep $_ eq '-n', @main::ARGV | ||||||||||||||||||||||||||||||||||||||||||
| 163 | or grep /^LIB=/, @main::ARGV and not grep /^INSTALLSCRIPT=/, @main::ARGV | ||||||||||||||||||||||||||||||||||||||||||
| 164 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 165 | { | ||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | @main::ARGV = grep $_ ne '-n', @main::ARGV; | |||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | warn "Skipping installation of scripts...\n"; | |||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | ▶ | while (@$progs_aref) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 170 | { | ||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | pop @$progs_aref ; | |||||||||||||||||||||||||||||||||||||||||
| 172 | } | ||||||||||||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||||||||||
| 174 | else | ||||||||||||||||||||||||||||||||||||||||||
| 175 | { | ||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | warn <<EOW; | |||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | This Perl module comes with several scripts which I would try to install in | ||||||||||||||||||||||||||||||||||||||||||
| 179 | directory $Config{installscript}. | ||||||||||||||||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||||||||||||||||
| 181 | To skip install, rerun with option -n given to Makefile.PL. | ||||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||
| 183 | EOW | ||||||||||||||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | 0 | ▶ | $progs_aref ||= [] ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$progs_aref ||= []
MC/DC0%0/1
$progs_aref ||= []
$progs_aref
Truth table0%0/2
A
A= $progs_aref
| |||||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | $ModuleInfo{'programs'} = [ map "$basedir$_", @$progs_aref ] ; | |||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | return @$progs_aref ; | |||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 194 | sub add_defines | ||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_defines: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | my ($defines_href) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | ▶ | if ( (ref($defines_href) eq 'HASH') && keys %$defines_href) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $defines_href eq "HASH" and keys %$defines_href
MC/DC0%0/2
ref $defines_href eq "HASH" and keys %$defines_href
ref $defines_href eq "HASH"
keys %$defines_href
Truth table0%0/3
A and B
A= ref $defines_href eq "HASH"B= keys %$defines_href
| |||||||||||||||||||||||||||||||||||||||||||
| 199 | { | ||||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | foreach my $key (keys %$defines_href) | |||||||||||||||||||||||||||||||||||||||||
| 201 | { | ||||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | ▶ | if (defined($defines_href->{$key}) && length($defines_href->{$key})) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $defines_href->{$key} and length $defines_href->{$key}
MC/DC0%0/2
defined $defines_href->{$key} and length $defines_href->{$key}
defined $defines_href->{$key}
length $defines_href->{$key}
Truth table0%0/3
A and B
A= defined $defines_href->{$key}B= length $defines_href->{$key}
| |||||||||||||||||||||||||||||||||||||||||||
| 203 | { | ||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | $ModuleInfo{'mod_defines'} .= "-D$key=$defines_href->{$key} " ; | |||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | $ModuleInfo{'make_defines'} .= "$key=$defines_href->{$key} " ; | |||||||||||||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||||||||||||
| 207 | else | ||||||||||||||||||||||||||||||||||||||||||
| 208 | { | ||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | $ModuleInfo{'mod_defines'} .= "-D$key " ; | |||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | $ModuleInfo{'make_defines'} .= "$key=1 " ; | |||||||||||||||||||||||||||||||||||||||||
| 211 | } | ||||||||||||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||||||||||||
| 213 | } | ||||||||||||||||||||||||||||||||||||||||||
| 214 | } | ||||||||||||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||||||||||||
| 216 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 217 | sub get_makeopts | ||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_makeopts: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 219 | ## -D = debug | ||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | $Makeutils::DEBUG = 0 ; | |||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 222 | grep $_ eq '-D', @main::ARGV | ||||||||||||||||||||||||||||||||||||||||||
| 223 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 224 | { | ||||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | $Makeutils::DEBUG = 1 ; | |||||||||||||||||||||||||||||||||||||||||
| 226 | } | ||||||||||||||||||||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||||||||||||||||||
| 228 | ## -d = debug | ||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 230 | grep $_ eq '-d', @main::ARGV | ||||||||||||||||||||||||||||||||||||||||||
| 231 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 232 | { | ||||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | @main::ARGV = grep $_ ne '-d', @main::ARGV; | |||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | warn "Buidling version with extra debugging enabled...\n"; | |||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | add_defines({ | |||||||||||||||||||||||||||||||||||||||||
| 236 | 'DEBUG' => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 237 | }) ; | ||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||
| 239 | # compile for debug | ||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | $ModuleInfo{'OPTIMIZE'} = '-ggdb -O0' ; | |||||||||||||||||||||||||||||||||||||||||
| 241 | } | ||||||||||||||||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||||||||||||||||
| 243 | ## -M = udpate MANIFEST | ||||||||||||||||||||||||||||||||||||||||||
| 244 | 0 | $Makeutils::UPDATE_MANIFEST = 0 ; | |||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 246 | grep $_ eq '-M', @main::ARGV | ||||||||||||||||||||||||||||||||||||||||||
| 247 | ) | ||||||||||||||||||||||||||||||||||||||||||
| 248 | { | ||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | $Makeutils::UPDATE_MANIFEST = 1 ; | |||||||||||||||||||||||||||||||||||||||||
| 250 | } | ||||||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||||||
| 252 | } | ||||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||||||||||||||||
| 255 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 256 | sub process_makeopts | ||||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
process_makeopts: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 258 | 0 | ▶ | if ($Makeutils::UPDATE_MANIFEST) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 259 | { | ||||||||||||||||||||||||||||||||||||||||||
| 260 | 0 | update_manifest() ; | |||||||||||||||||||||||||||||||||||||||||
| 261 | } | ||||||||||||||||||||||||||||||||||||||||||
| 262 | } | ||||||||||||||||||||||||||||||||||||||||||
| 263 | |||||||||||||||||||||||||||||||||||||||||||
| 264 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 265 | sub update_manifest | ||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update_manifest: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 267 | ## Read file | ||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | my %manifest ; | |||||||||||||||||||||||||||||||||||||||||
| 269 | my $line ; | ||||||||||||||||||||||||||||||||||||||||||
| 270 | 0 | ▶ | open my $fh, "<MANIFEST" or die "Error: Unable to read MANIFEST file" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 271 | 0 | ▶ | while(defined($line = <$fh>)) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 272 | { | ||||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | chomp $line ; | |||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | $line =~ s/[^[:ascii:]]/ /g; | |||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | $line =~ s/^\s+// ; | |||||||||||||||||||||||||||||||||||||||||
| 276 | 0 | $line =~ s/\s+$// ; | |||||||||||||||||||||||||||||||||||||||||
| 277 | 0 | $line =~ s/^#.*// ; | |||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | next unless $line ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | $manifest{$line} = 1 ; | |||||||||||||||||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | close $fh ; | |||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||
| 284 | ## Build expected list | ||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | my @expected = qw( | |||||||||||||||||||||||||||||||||||||||||
| 286 | MANIFEST | ||||||||||||||||||||||||||||||||||||||||||
| 287 | README | ||||||||||||||||||||||||||||||||||||||||||
| 288 | COPYING | ||||||||||||||||||||||||||||||||||||||||||
| 289 | Changes | ||||||||||||||||||||||||||||||||||||||||||
| 290 | Makefile.PL | ||||||||||||||||||||||||||||||||||||||||||
| 291 | plib/Makeutils.pm | ||||||||||||||||||||||||||||||||||||||||||
| 292 | ppport.h | ||||||||||||||||||||||||||||||||||||||||||
| 293 | typemap | ||||||||||||||||||||||||||||||||||||||||||
| 294 | ) ; | ||||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||||
| 296 | # xs | ||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | push @expected, "$ModuleInfo{'root'}.xs" ; | |||||||||||||||||||||||||||||||||||||||||
| 298 | 0 | push @expected, find_recurse("xs", "*.xs") ; | |||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||||
| 300 | # t | ||||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | push @expected, find_recurse("t", "*.t") ; | |||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||
| 303 | # scripts | ||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | push @expected, @{$ModuleInfo{'programs'}} ; | |||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||
| 306 | # Perl | ||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | push @expected, find_recurse("lib", "*.pm") ; | |||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||
| 309 | # C | ||||||||||||||||||||||||||||||||||||||||||
| 310 | 0 | push @expected, find_recurse("clib", "*.c") ; | |||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | push @expected, find_recurse("clib", "*.h") ; | |||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||||||||||||||||
| 314 | ## Find any missing | ||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | my @missing ; | |||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | foreach my $file (@expected) | |||||||||||||||||||||||||||||||||||||||||
| 317 | { | ||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | if (!exists($manifest{$file})) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 319 | { | ||||||||||||||||||||||||||||||||||||||||||
| 320 | 0 | push @missing, $file ; | |||||||||||||||||||||||||||||||||||||||||
| 321 | } | ||||||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||||||||||||
| 324 | 0 | print "\nUpdating MANIFEST\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 325 | 0 | print "=================\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 326 | 0 | ▶ | if (@missing) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 327 | { | ||||||||||||||||||||||||||||||||||||||||||
| 328 | ## Append | ||||||||||||||||||||||||||||||||||||||||||
| 329 | 0 | ▶ | open my $fh, ">>MANIFEST" or die "Error: Unable to write to MANIFEST file" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | print $fh "\n\n## Missing files:\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | foreach my $file (@missing) | |||||||||||||||||||||||||||||||||||||||||
| 332 | { | ||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | print $fh "$file\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||||||||||||||||
| 335 | 0 | close $fh ; | |||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | print "Appended ", scalar(@missing), " files:\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | foreach my $file (@missing) | |||||||||||||||||||||||||||||||||||||||||
| 339 | { | ||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | print " $file\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 341 | } | ||||||||||||||||||||||||||||||||||||||||||
| 342 | } | ||||||||||||||||||||||||||||||||||||||||||
| 343 | else | ||||||||||||||||||||||||||||||||||||||||||
| 344 | { | ||||||||||||||||||||||||||||||||||||||||||
| 345 | 0 | print "No files missing\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 346 | } | ||||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||
| 349 | 0 | print "\nAll Files:\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 350 | 0 | foreach my $file (@expected) | |||||||||||||||||||||||||||||||||||||||||
| 351 | { | ||||||||||||||||||||||||||||||||||||||||||
| 352 | 0 | print " $file\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 353 | } | ||||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | exit 0 ; | |||||||||||||||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||
| 358 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 359 | sub find_recurse | ||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
find_recurse: not called CC=5 SCAR=29.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | my ($dir, $spec) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | my @files = () ; | |||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||||
| 364 | # depth last | ||||||||||||||||||||||||||||||||||||||||||
| 365 | 0 | ▶ | foreach my $f (glob("$dir/$spec")) | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
| |||||||||||||||||||||||||||||||||||||||||||
| 366 | { | ||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | ▶ | if (-f $f) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 368 | { | ||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | push @files, $f ; | |||||||||||||||||||||||||||||||||||||||||
| 370 | } | ||||||||||||||||||||||||||||||||||||||||||
| 371 | } | ||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | foreach my $d (glob("$dir/*")) | |||||||||||||||||||||||||||||||||||||||||
| 373 | { | ||||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | ▶ | if (-d $d) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 375 | { | ||||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | push @files, find_recurse($d, $spec) ; | |||||||||||||||||||||||||||||||||||||||||
| 377 | } | ||||||||||||||||||||||||||||||||||||||||||
| 378 | } | ||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | return @files ; | |||||||||||||||||||||||||||||||||||||||||
| 381 | } | ||||||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||||||
| 383 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 384 | sub add_objects | ||||||||||||||||||||||||||||||||||||||||||
| 385 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_objects: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | my ($basedir, $objs_aref) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | foreach my $obj (@$objs_aref) | |||||||||||||||||||||||||||||||||||||||||
| 389 | { | ||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | push @{$ModuleInfo{'obj_list'}}, "$basedir/$obj" ; | |||||||||||||||||||||||||||||||||||||||||
| 391 | } | ||||||||||||||||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||||||||||||||||
| 393 | ## Recreate list of all objects | ||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | _create_objects_list() ; | |||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||||
| 396 | ## Create list of includes | ||||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | _create_includes_list() ; | |||||||||||||||||||||||||||||||||||||||||
| 398 | } | ||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||
| 400 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 401 | # 'dvb_lib' => {'mkf' => 'Subdir-min.mk'}, | ||||||||||||||||||||||||||||||||||||||||||
| 402 | # 'dvb_ts_lib' => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 403 | # 'libmpeg2' => { | ||||||||||||||||||||||||||||||||||||||||||
| 404 | # 'config' => { | ||||||||||||||||||||||||||||||||||||||||||
| 405 | # 'file' => 'include/config.h', | ||||||||||||||||||||||||||||||||||||||||||
| 406 | # 'func' => \&create_libmpeg2_config_h, | ||||||||||||||||||||||||||||||||||||||||||
| 407 | # }, | ||||||||||||||||||||||||||||||||||||||||||
| 408 | # }, | ||||||||||||||||||||||||||||||||||||||||||
| 409 | # 'mpeg2audio' => { | ||||||||||||||||||||||||||||||||||||||||||
| 410 | # 'config' => { | ||||||||||||||||||||||||||||||||||||||||||
| 411 | # 'file' => 'config.h', | ||||||||||||||||||||||||||||||||||||||||||
| 412 | # 'func' => \&create_mpeg2audio_config_h, | ||||||||||||||||||||||||||||||||||||||||||
| 413 | # }, | ||||||||||||||||||||||||||||||||||||||||||
| 414 | # }, | ||||||||||||||||||||||||||||||||||||||||||
| 415 | # | ||||||||||||||||||||||||||||||||||||||||||
| 416 | sub add_clibs | ||||||||||||||||||||||||||||||||||||||||||
| 417 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_clibs: not called CC=20 SCAR=60.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 418 | 0 | my ($basedir, $clibs_href) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 419 | |||||||||||||||||||||||||||||||||||||||||||
| 420 | 0 | ▶ | print "add_clibs($basedir)\n" if $DEBUG ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||||||||||||||||
| 422 | ## Include makefiles & get objects | ||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | print "Including makefiles from sub libraries:\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 424 | 0 | foreach my $lib (keys %$clibs_href) | |||||||||||||||||||||||||||||||||||||||||
| 425 | { | ||||||||||||||||||||||||||||||||||||||||||
| 426 | 0 | my $libdir = "$basedir/$lib/" ; | |||||||||||||||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | $ModuleInfo{'clibs'}{$lib} = { | |||||||||||||||||||||||||||||||||||||||||
| 429 | 'file' => "", | ||||||||||||||||||||||||||||||||||||||||||
| 430 | 'objects' => [], | ||||||||||||||||||||||||||||||||||||||||||
| 431 | 'includes' => [ $libdir ], | ||||||||||||||||||||||||||||||||||||||||||
| 432 | } ; | ||||||||||||||||||||||||||||||||||||||||||
| 433 | |||||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | print " * $lib ... " ; | |||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | my $mkf = "$libdir/" ; | |||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | my $specified_mkf = 0 ; | |||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | ▶ | if ( ref($clibs_href->{$lib}) eq 'HASH') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 438 | { | ||||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | ▶ | if ( exists($clibs_href->{$lib}{'mkf'})) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 440 | { | ||||||||||||||||||||||||||||||||||||||||||
| 441 | 0 | ++$specified_mkf ; | |||||||||||||||||||||||||||||||||||||||||
| 442 | 0 | $mkf .= $clibs_href->{$lib}{'mkf'} ; | |||||||||||||||||||||||||||||||||||||||||
| 443 | } | ||||||||||||||||||||||||||||||||||||||||||
| 444 | else | ||||||||||||||||||||||||||||||||||||||||||
| 445 | { | ||||||||||||||||||||||||||||||||||||||||||
| 446 | 0 | $mkf .= 'Subdir.mk' ; | |||||||||||||||||||||||||||||||||||||||||
| 447 | } | ||||||||||||||||||||||||||||||||||||||||||
| 448 | } | ||||||||||||||||||||||||||||||||||||||||||
| 449 | else | ||||||||||||||||||||||||||||||||||||||||||
| 450 | { | ||||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | $mkf .= 'Subdir.mk' ; | |||||||||||||||||||||||||||||||||||||||||
| 452 | } | ||||||||||||||||||||||||||||||||||||||||||
| 453 | |||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | ▶ | print "\n * * mkf = $mkf\n" if $DEBUG ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 455 | |||||||||||||||||||||||||||||||||||||||||||
| 456 | ## read file | ||||||||||||||||||||||||||||||||||||||||||
| 457 | 0 | ▶ | if (-f $mkf) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 458 | { | ||||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | open my $fh, "<$mkf" ; | |||||||||||||||||||||||||||||||||||||||||
| 460 | 0 | ▶ | if ($fh) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 461 | { | ||||||||||||||||||||||||||||||||||||||||||
| 462 | 0 | $ModuleInfo{'clibs'}{$lib}{'file'} = do { local $/; <$fh> } ; | |||||||||||||||||||||||||||||||||||||||||
| 463 | 0 | close $fh ; | |||||||||||||||||||||||||||||||||||||||||
| 464 | 0 | print "ok" ; | |||||||||||||||||||||||||||||||||||||||||
| 465 | } | ||||||||||||||||||||||||||||||||||||||||||
| 466 | else | ||||||||||||||||||||||||||||||||||||||||||
| 467 | { | ||||||||||||||||||||||||||||||||||||||||||
| 468 | 0 | print "Unable to read $mkf : $!\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 469 | 0 | ▶ | exit(1) if $specified_mkf ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 470 | } | ||||||||||||||||||||||||||||||||||||||||||
| 471 | } | ||||||||||||||||||||||||||||||||||||||||||
| 472 | else | ||||||||||||||||||||||||||||||||||||||||||
| 473 | { | ||||||||||||||||||||||||||||||||||||||||||
| 474 | 0 | print "$mkf not found\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 475 | 0 | ▶ | exit(1) if $specified_mkf ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 476 | } | ||||||||||||||||||||||||||||||||||||||||||
| 477 | 0 | print "\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 478 | |||||||||||||||||||||||||||||||||||||||||||
| 479 | ## Process file | ||||||||||||||||||||||||||||||||||||||||||
| 480 | 0 | my @lines = split /\n/, $ModuleInfo{'clibs'}{$lib}{'file'} ; | |||||||||||||||||||||||||||||||||||||||||
| 481 | 0 | foreach my $line (@lines) | |||||||||||||||||||||||||||||||||||||||||
| 482 | { | ||||||||||||||||||||||||||||||||||||||||||
| 483 | 0 | chomp $line ; | |||||||||||||||||||||||||||||||||||||||||
| 484 | 0 | $line =~ s/#.*// ; | |||||||||||||||||||||||||||||||||||||||||
| 485 | 0 | $line =~ s/^\s+// ; | |||||||||||||||||||||||||||||||||||||||||
| 486 | 0 | $line =~ s/\s+$// ; | |||||||||||||||||||||||||||||||||||||||||
| 487 | 0 | ▶ | next unless $line ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 488 | |||||||||||||||||||||||||||||||||||||||||||
| 489 | # look for something like: | ||||||||||||||||||||||||||||||||||||||||||
| 490 | # OBJS-libdvb_ts_lib := \ | ||||||||||||||||||||||||||||||||||||||||||
| 491 | # $(libdvb_ts_lib)/ts_parse.o \ | ||||||||||||||||||||||||||||||||||||||||||
| 492 | # $(libdvb_ts_lib)/ts_skip.o \ | ||||||||||||||||||||||||||||||||||||||||||
| 493 | # $(libdvb_ts_lib)/ts_split.o \ | ||||||||||||||||||||||||||||||||||||||||||
| 494 | # $(libdvb_ts_lib)/ts_cut.o | ||||||||||||||||||||||||||||||||||||||||||
| 495 | # | ||||||||||||||||||||||||||||||||||||||||||
| 496 | # Get just the *.o | ||||||||||||||||||||||||||||||||||||||||||
| 497 | # | ||||||||||||||||||||||||||||||||||||||||||
| 498 | 0 | ▶ | if ($line =~ m/(\S+\.o)/) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 499 | { | ||||||||||||||||||||||||||||||||||||||||||
| 500 | 0 | my $obj = $1 ; | |||||||||||||||||||||||||||||||||||||||||
| 501 | |||||||||||||||||||||||||||||||||||||||||||
| 502 | # replace $(...) with the dir | ||||||||||||||||||||||||||||||||||||||||||
| 503 | 0 | $obj =~ s%\$\([^)]+\)%$basedir/$lib% ; | |||||||||||||||||||||||||||||||||||||||||
| 504 | 0 | push @{$ModuleInfo{'clibs'}{$lib}{'objects'}}, $obj ; | |||||||||||||||||||||||||||||||||||||||||
| 505 | } | ||||||||||||||||||||||||||||||||||||||||||
| 506 | } | ||||||||||||||||||||||||||||||||||||||||||
| 507 | |||||||||||||||||||||||||||||||||||||||||||
| 508 | ## check for any include subdirs | ||||||||||||||||||||||||||||||||||||||||||
| 509 | 0 | for my $incdir (qw/include inc h shared/) | |||||||||||||||||||||||||||||||||||||||||
| 510 | { | ||||||||||||||||||||||||||||||||||||||||||
| 511 | 0 | ▶ | if (-d "$libdir$incdir") | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 512 | { | ||||||||||||||||||||||||||||||||||||||||||
| 513 | 0 | push @{$ModuleInfo{'clibs'}{$lib}{'includes'}}, "$libdir$incdir" ; | |||||||||||||||||||||||||||||||||||||||||
| 514 | } | ||||||||||||||||||||||||||||||||||||||||||
| 515 | } | ||||||||||||||||||||||||||||||||||||||||||
| 516 | } | ||||||||||||||||||||||||||||||||||||||||||
| 517 | |||||||||||||||||||||||||||||||||||||||||||
| 518 | ## Create config files | ||||||||||||||||||||||||||||||||||||||||||
| 519 | 0 | foreach my $lib (keys %$clibs_href) | |||||||||||||||||||||||||||||||||||||||||
| 520 | { | ||||||||||||||||||||||||||||||||||||||||||
| 521 | 0 | ▶ | if ( (ref($clibs_href->{$lib}) eq 'HASH') && (exists($clibs_href->{$lib}{'config'})) ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $clibs_href->{$lib} eq "HASH" and exists $clibs_href->{$lib}{"config"}
MC/DC0%0/2
ref $clibs_href->{$lib} eq "HASH" and exists $clibs_href->{$lib}{"config"}
ref $clibs_href->{$lib} eq "HASH"
exists $clibs_href->{$lib}{"config"}
Truth table0%0/3
A and B
A= ref $clibs_href->{$lib} eq "HASH"B= exists $clibs_href->{$lib}{"config"}
| |||||||||||||||||||||||||||||||||||||||||||
| 522 | { | ||||||||||||||||||||||||||||||||||||||||||
| 523 | 0 | ▶ | if ( (ref($clibs_href->{$lib}{'config'}{'func'}) eq 'CODE') && (exists($clibs_href->{$lib}{'config'}{'file'})) ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $clibs_href->{$lib}{"config"}{"func"} eq "CODE" and exists $clibs_href->{$lib}{"config"}{"file"}
MC/DC0%0/2
ref $clibs_href->{$lib}{"config"}{"func"} eq "CODE" and exists $clibs_href->{$lib}{"config"}{"file"}
ref $clibs_href->{$lib}{"config"}{"func"} eq "CODE"
exists $clibs_href->{$lib}{"config"}{"file"}
Truth table0%0/3
A and B
A= ref $clibs_href->{$lib}{"config"}{"func"} eq "CODE"B= exists $clibs_href->{$lib}{"config"}{"file"}
| |||||||||||||||||||||||||||||||||||||||||||
| 524 | { | ||||||||||||||||||||||||||||||||||||||||||
| 525 | 0 | my $func = $clibs_href->{$lib}{'config'}{'func'} ; | |||||||||||||||||||||||||||||||||||||||||
| 526 | 0 | my $config_h = "$basedir/$lib/$clibs_href->{$lib}{'config'}{'file'}" ; | |||||||||||||||||||||||||||||||||||||||||
| 527 | |||||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | print "creating config file $config_h ... " ; | |||||||||||||||||||||||||||||||||||||||||
| 529 | 0 | &$func($config_h, %{$ModuleInfo{'config'}}) ; | |||||||||||||||||||||||||||||||||||||||||
| 530 | 0 | print "ok\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 531 | } | ||||||||||||||||||||||||||||||||||||||||||
| 532 | } | ||||||||||||||||||||||||||||||||||||||||||
| 533 | } | ||||||||||||||||||||||||||||||||||||||||||
| 534 | |||||||||||||||||||||||||||||||||||||||||||
| 535 | ## Recreate list of all objects | ||||||||||||||||||||||||||||||||||||||||||
| 536 | 0 | _create_objects_list() ; | |||||||||||||||||||||||||||||||||||||||||
| 537 | |||||||||||||||||||||||||||||||||||||||||||
| 538 | ## Create list of includes | ||||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | _create_includes_list() ; | |||||||||||||||||||||||||||||||||||||||||
| 540 | } | ||||||||||||||||||||||||||||||||||||||||||
| 541 | |||||||||||||||||||||||||||||||||||||||||||
| 542 | |||||||||||||||||||||||||||||||||||||||||||
| 543 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 544 | sub _create_objects_list | ||||||||||||||||||||||||||||||||||||||||||
| 545 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_create_objects_list: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||||||||||||||
| 546 | ## root | ||||||||||||||||||||||||||||||||||||||||||
| 547 | 0 | $ModuleInfo{'objects'} = "$ModuleInfo{'root'}.o " ; | |||||||||||||||||||||||||||||||||||||||||
| 548 | |||||||||||||||||||||||||||||||||||||||||||
| 549 | ## include makefiles | ||||||||||||||||||||||||||||||||||||||||||
| 550 | 0 | foreach my $lib (sort keys %{$ModuleInfo{'clibs'}}) | |||||||||||||||||||||||||||||||||||||||||
| 551 | { | ||||||||||||||||||||||||||||||||||||||||||
| 552 | 0 | $ModuleInfo{'objects'} .= join(' ', @{$ModuleInfo{'clibs'}{$lib}{'objects'}}) . " " ; | |||||||||||||||||||||||||||||||||||||||||
| 553 | } | ||||||||||||||||||||||||||||||||||||||||||
| 554 | |||||||||||||||||||||||||||||||||||||||||||
| 555 | ## additional objects | ||||||||||||||||||||||||||||||||||||||||||
| 556 | 0 | $ModuleInfo{'objects'} .= join(' ', @{$ModuleInfo{'obj_list'}}) . " " ; | |||||||||||||||||||||||||||||||||||||||||
| 557 | } | ||||||||||||||||||||||||||||||||||||||||||
| 558 | |||||||||||||||||||||||||||||||||||||||||||
| 559 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 560 | sub _create_includes_list | ||||||||||||||||||||||||||||||||||||||||||
| 561 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_create_includes_list: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||||||||||||||
| 562 | ## include makefiles | ||||||||||||||||||||||||||||||||||||||||||
| 563 | 0 | $ModuleInfo{'includes'} = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 564 | 0 | foreach my $lib (sort keys %{$ModuleInfo{'clibs'}}) | |||||||||||||||||||||||||||||||||||||||||
| 565 | { | ||||||||||||||||||||||||||||||||||||||||||
| 566 | 0 | foreach my $inc ( @{$ModuleInfo{'clibs'}{$lib}{'includes'}} ) | |||||||||||||||||||||||||||||||||||||||||
| 567 | { | ||||||||||||||||||||||||||||||||||||||||||
| 568 | 0 | $ModuleInfo{'includes'} .= "-I$inc " ; | |||||||||||||||||||||||||||||||||||||||||
| 569 | } | ||||||||||||||||||||||||||||||||||||||||||
| 570 | } | ||||||||||||||||||||||||||||||||||||||||||
| 571 | |||||||||||||||||||||||||||||||||||||||||||
| 572 | } | ||||||||||||||||||||||||||||||||||||||||||
| 573 | |||||||||||||||||||||||||||||||||||||||||||
| 574 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 575 | sub _c_try | ||||||||||||||||||||||||||||||||||||||||||
| 576 | 24 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_c_try: called CC=22 SCAR=36.1
| |||||||||||||||||||||||||||||||||||||||||||
| 577 | 24 | my ($info_tag, $cc, $target, $msg, $code, $ok_val, $cflags, $exec_out_ref) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 578 | |||||||||||||||||||||||||||||||||||||||||||
| 579 | 24 | ▶ | if ($DEBUG && $msg) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$Makeutils::DEBUG and $msg
MC/DC0%0/2
$Makeutils::DEBUG and $msg
$Makeutils::DEBUG
$msg
Truth table33%1/3
A and B
A= $Makeutils::DEBUGB= $msg
| |||||||||||||||||||||||||||||||||||||||||||
| 580 | { | ||||||||||||||||||||||||||||||||||||||||||
| 581 | 0 | print "\n-------------------------\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 582 | } | ||||||||||||||||||||||||||||||||||||||||||
| 583 | 24 | ▶ | if ($info_tag) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 584 | { | ||||||||||||||||||||||||||||||||||||||||||
| 585 | 24 | ▶ | $ModuleInfo{'C_TRY'}{$info_tag} ||= [] ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$Makeutils::ModuleInfo{"C_TRY"}{$info_tag} ||= []
MC/DC100%1/1
$Makeutils::ModuleInfo{"C_TRY"}{$info_tag} ||= []
$Makeutils::ModuleInfo{"C_TRY"}{$info_tag}
Truth table100%2/2
A
A= $Makeutils::ModuleInfo{"C_TRY"}{$info_tag}
| |||||||||||||||||||||||||||||||||||||||||||
| 586 | } | ||||||||||||||||||||||||||||||||||||||||||
| 587 | |||||||||||||||||||||||||||||||||||||||||||
| 588 | 24 | ▶ | print "$msg... " if $msg ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 589 | |||||||||||||||||||||||||||||||||||||||||||
| 590 | 24 | ▶ | $ok_val=1 unless defined $ok_val ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 591 | |||||||||||||||||||||||||||||||||||||||||||
| 592 | 24 | ▶ | $cflags ||= "" ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$cflags ||= ""
MC/DC100%1/1
$cflags ||= ""
$cflags
Truth table100%2/2
A
A= $cflags
| |||||||||||||||||||||||||||||||||||||||||||
| 593 | 24 | my $ok = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 594 | 24 | my $conftest = "conftest.c" ; | |||||||||||||||||||||||||||||||||||||||||
| 595 | 24 | my $conferr = "conftest.err" ; | |||||||||||||||||||||||||||||||||||||||||
| 596 | |||||||||||||||||||||||||||||||||||||||||||
| 597 | 24 | ▶ | open my $fh, ">$conftest" or die "Error: unable to create test file $conftest : $!"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 598 | 24 | print $fh $code ; | |||||||||||||||||||||||||||||||||||||||||
| 599 | 24 | close $fh ; | |||||||||||||||||||||||||||||||||||||||||
| 600 | |||||||||||||||||||||||||||||||||||||||||||
| 601 | 24 | unlink $target ; | |||||||||||||||||||||||||||||||||||||||||
| 602 | |||||||||||||||||||||||||||||||||||||||||||
| 603 | 24 | my $cmd = "$cc $conftest $cflags 2> $conferr" ; | |||||||||||||||||||||||||||||||||||||||||
| 604 | 24 | my $rc = system($cmd) ; | |||||||||||||||||||||||||||||||||||||||||
| 605 | 24 | my $errstr ; | |||||||||||||||||||||||||||||||||||||||||
| 606 | 24 | open $fh, "<$conferr" ; | |||||||||||||||||||||||||||||||||||||||||
| 607 | 24 | ▶ | if ($fh) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 608 | { | ||||||||||||||||||||||||||||||||||||||||||
| 609 | 24 | $errstr = do { local $/; <$fh> } ; | |||||||||||||||||||||||||||||||||||||||||
| 610 | 24 | close $fh ; | |||||||||||||||||||||||||||||||||||||||||
| 611 | 24 | $errstr =~ s/^\s+.//gm ; | |||||||||||||||||||||||||||||||||||||||||
| 612 | } | ||||||||||||||||||||||||||||||||||||||||||
| 613 | |||||||||||||||||||||||||||||||||||||||||||
| 614 | 24 | ▶ | if ($DEBUG) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 615 | { | ||||||||||||||||||||||||||||||||||||||||||
| 616 | 0 | print "\n- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 617 | 0 | print "- RC: $rc\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 618 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 619 | 0 | print "- Code:\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 620 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 621 | 0 | print "$code\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 622 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 623 | 0 | print "- Cmd: $cmd\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 624 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 625 | 0 | print "- Target: $target [size=", -s $target, "]\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 626 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 627 | 0 | print "- Compile errors:\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 628 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 629 | 0 | print "$errstr" ; | |||||||||||||||||||||||||||||||||||||||||
| 630 | } | ||||||||||||||||||||||||||||||||||||||||||
| 631 | |||||||||||||||||||||||||||||||||||||||||||
| 632 | 24 | ▶ | if ($info_tag) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 633 | { | ||||||||||||||||||||||||||||||||||||||||||
| 634 | 24 | ▶ | my $size = -s $target || 0 ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
-s $target || 0
MC/DC100%1/1
-s $target || 0
-s $target
Truth table100%2/2
A
A= -s $target
| |||||||||||||||||||||||||||||||||||||||||||
| 635 | 24 | push @{$ModuleInfo{'C_TRY'}{$info_tag}}, ( | |||||||||||||||||||||||||||||||||||||||||
| 636 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 637 | "- RC: $rc", | ||||||||||||||||||||||||||||||||||||||||||
| 638 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 639 | "- Code:", | ||||||||||||||||||||||||||||||||||||||||||
| 640 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 641 | "$code", | ||||||||||||||||||||||||||||||||||||||||||
| 642 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 643 | "- Cmd: $cmd", | ||||||||||||||||||||||||||||||||||||||||||
| 644 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 645 | "- Target: $target [size=$size]", | ||||||||||||||||||||||||||||||||||||||||||
| 646 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 647 | "- Compile errors:", | ||||||||||||||||||||||||||||||||||||||||||
| 648 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 649 | "$errstr" | ||||||||||||||||||||||||||||||||||||||||||
| 650 | ) ; | ||||||||||||||||||||||||||||||||||||||||||
| 651 | } | ||||||||||||||||||||||||||||||||||||||||||
| 652 | |||||||||||||||||||||||||||||||||||||||||||
| 653 | # check for errors | ||||||||||||||||||||||||||||||||||||||||||
| 654 | 24 | ▶ | if ( ($rc==0) && (!$errstr) && (-s $target) ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition83%5/6
$rc == 0 and not $errstr and -s $target
$rc == 0 and not $errstr
MC/DC66%2/3
$rc == 0 and not $errstr and -s $target
$rc == 0
not $errstr
-s $target
Truth table75%3/4
A and not(B) and C
A= $rc == 0B= not $errstrC= -s $target
| |||||||||||||||||||||||||||||||||||||||||||
| 655 | { | ||||||||||||||||||||||||||||||||||||||||||
| 656 | # stop here because this worked | ||||||||||||||||||||||||||||||||||||||||||
| 657 | 19 | $ok = $ok_val ; | |||||||||||||||||||||||||||||||||||||||||
| 658 | |||||||||||||||||||||||||||||||||||||||||||
| 659 | # ## See if we want to run the code | ||||||||||||||||||||||||||||||||||||||||||
| 660 | # if ($exec_out_ref && ref($exec_out_ref)) | ||||||||||||||||||||||||||||||||||||||||||
| 661 | # { | ||||||||||||||||||||||||||||||||||||||||||
| 662 | # my @out = `./$conftest` ; | ||||||||||||||||||||||||||||||||||||||||||
| 663 | # } | ||||||||||||||||||||||||||||||||||||||||||
| 664 | } | ||||||||||||||||||||||||||||||||||||||||||
| 665 | |||||||||||||||||||||||||||||||||||||||||||
| 666 | 24 | unlink $conftest ; | |||||||||||||||||||||||||||||||||||||||||
| 667 | 24 | unlink $conferr ; | |||||||||||||||||||||||||||||||||||||||||
| 668 | |||||||||||||||||||||||||||||||||||||||||||
| 669 | 24 | ▶ | if ($msg) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 670 | { | ||||||||||||||||||||||||||||||||||||||||||
| 671 | 21 | ▶ | if ($DEBUG) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 672 | { | ||||||||||||||||||||||||||||||||||||||||||
| 673 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 674 | 0 | print "- Return: [ok=$ok] " ; | |||||||||||||||||||||||||||||||||||||||||
| 675 | } | ||||||||||||||||||||||||||||||||||||||||||
| 676 | # print $ok ? "$ok\n" : "no\n" ; | ||||||||||||||||||||||||||||||||||||||||||
| 677 | 21 | ▶ | print $ok ? "yes\n" : "no\n" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 678 | } | ||||||||||||||||||||||||||||||||||||||||||
| 679 | |||||||||||||||||||||||||||||||||||||||||||
| 680 | 24 | ▶ | if ($info_tag) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 681 | { | ||||||||||||||||||||||||||||||||||||||||||
| 682 | 24 | push @{$ModuleInfo{'C_TRY'}{$info_tag}}, ( | |||||||||||||||||||||||||||||||||||||||||
| 683 | "- - - - - - - - - - - - -", | ||||||||||||||||||||||||||||||||||||||||||
| 684 | "- Return: [ok=$ok]" | ||||||||||||||||||||||||||||||||||||||||||
| 685 | ) ; | ||||||||||||||||||||||||||||||||||||||||||
| 686 | } | ||||||||||||||||||||||||||||||||||||||||||
| 687 | |||||||||||||||||||||||||||||||||||||||||||
| 688 | 24 | ▶ | if ($DEBUG && $msg) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$Makeutils::DEBUG and $msg
MC/DC0%0/2
$Makeutils::DEBUG and $msg
$Makeutils::DEBUG
$msg
Truth table33%1/3
A and B
A= $Makeutils::DEBUGB= $msg
| |||||||||||||||||||||||||||||||||||||||||||
| 689 | { | ||||||||||||||||||||||||||||||||||||||||||
| 690 | 0 | print "-------------------------\n\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 691 | } | ||||||||||||||||||||||||||||||||||||||||||
| 692 | |||||||||||||||||||||||||||||||||||||||||||
| 693 | |||||||||||||||||||||||||||||||||||||||||||
| 694 | 24 | return $ok ; | |||||||||||||||||||||||||||||||||||||||||
| 695 | } | ||||||||||||||||||||||||||||||||||||||||||
| 696 | |||||||||||||||||||||||||||||||||||||||||||
| 697 | |||||||||||||||||||||||||||||||||||||||||||
| 698 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 699 | sub c_try | ||||||||||||||||||||||||||||||||||||||||||
| 700 | 19 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_try: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 701 | 19 | my ($info_tag, $msg, $code, $ok_val, $cflags, $exec_out_ref) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 702 | |||||||||||||||||||||||||||||||||||||||||||
| 703 | 19 | my $confobj = "conftest.o" ; | |||||||||||||||||||||||||||||||||||||||||
| 704 | 19 | my $cc = "$Config{'cc'} -o $confobj -c" ; | |||||||||||||||||||||||||||||||||||||||||
| 705 | |||||||||||||||||||||||||||||||||||||||||||
| 706 | 19 | my $ok = _c_try($info_tag, $cc, $confobj, $msg, $code, $ok_val, $cflags, $exec_out_ref) ; | |||||||||||||||||||||||||||||||||||||||||
| 707 | |||||||||||||||||||||||||||||||||||||||||||
| 708 | 19 | unlink $confobj ; | |||||||||||||||||||||||||||||||||||||||||
| 709 | |||||||||||||||||||||||||||||||||||||||||||
| 710 | 19 | return $ok ; | |||||||||||||||||||||||||||||||||||||||||
| 711 | } | ||||||||||||||||||||||||||||||||||||||||||
| 712 | |||||||||||||||||||||||||||||||||||||||||||
| 713 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 714 | sub c_try_link | ||||||||||||||||||||||||||||||||||||||||||
| 715 | 5 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_try_link: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 716 | 5 | my ($info_tag, $msg, $code, $ok_val, $cflags, $exec_out_ref, $ld_flags) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 717 | |||||||||||||||||||||||||||||||||||||||||||
| 718 | 5 | ▶ | $ld_flags ||= "" ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$ld_flags ||= ""
MC/DC100%1/1
$ld_flags ||= ""
$ld_flags
Truth table100%2/2
A
A= $ld_flags
| |||||||||||||||||||||||||||||||||||||||||||
| 719 | |||||||||||||||||||||||||||||||||||||||||||
| 720 | 5 | my $target = "conftest$Config{_exe}" ; | |||||||||||||||||||||||||||||||||||||||||
| 721 | 5 | my $cc = "$Config{'cc'} -o $target $ld_flags" ; | |||||||||||||||||||||||||||||||||||||||||
| 722 | |||||||||||||||||||||||||||||||||||||||||||
| 723 | 5 | my $ok = _c_try($info_tag, $cc, $target, $msg, $code, $ok_val, $cflags, $exec_out_ref) ; | |||||||||||||||||||||||||||||||||||||||||
| 724 | |||||||||||||||||||||||||||||||||||||||||||
| 725 | 5 | unlink $target ; | |||||||||||||||||||||||||||||||||||||||||
| 726 | |||||||||||||||||||||||||||||||||||||||||||
| 727 | 5 | return $ok ; | |||||||||||||||||||||||||||||||||||||||||
| 728 | } | ||||||||||||||||||||||||||||||||||||||||||
| 729 | |||||||||||||||||||||||||||||||||||||||||||
| 730 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 731 | sub c_try_keywords | ||||||||||||||||||||||||||||||||||||||||||
| 732 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_try_keywords: called CC=10 SCAR=27.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 733 | 2 | my ($info_tag, $msg, $code, $keywords_aref, $cflags) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 734 | |||||||||||||||||||||||||||||||||||||||||||
| 735 | |||||||||||||||||||||||||||||||||||||||||||
| 736 | 2 | ▶ | if ($DEBUG) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 737 | { | ||||||||||||||||||||||||||||||||||||||||||
| 738 | 0 | print "\n-------------------------\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 739 | } | ||||||||||||||||||||||||||||||||||||||||||
| 740 | |||||||||||||||||||||||||||||||||||||||||||
| 741 | 2 | ▶ | print "$msg... " if $msg ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 742 | |||||||||||||||||||||||||||||||||||||||||||
| 743 | 2 | my $ok = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 744 | |||||||||||||||||||||||||||||||||||||||||||
| 745 | 2 | foreach my $ac_kw (@$keywords_aref) | |||||||||||||||||||||||||||||||||||||||||
| 746 | { | ||||||||||||||||||||||||||||||||||||||||||
| 747 | 2 | ▶ | if ($DEBUG) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 748 | { | ||||||||||||||||||||||||||||||||||||||||||
| 749 | 0 | print "\n- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 750 | 0 | print "- Keyword: $ac_kw" ; | |||||||||||||||||||||||||||||||||||||||||
| 751 | } | ||||||||||||||||||||||||||||||||||||||||||
| 752 | |||||||||||||||||||||||||||||||||||||||||||
| 753 | 2 | my $code_str = $code ; | |||||||||||||||||||||||||||||||||||||||||
| 754 | 2 | $code_str =~ s/\$ac_kw/$ac_kw/g ; | |||||||||||||||||||||||||||||||||||||||||
| 755 | 2 | $ok = c_try($info_tag, "", $code_str, $ac_kw, $cflags) ; | |||||||||||||||||||||||||||||||||||||||||
| 756 | |||||||||||||||||||||||||||||||||||||||||||
| 757 | 2 | ▶ | if ($ok) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 758 | { | ||||||||||||||||||||||||||||||||||||||||||
| 759 | 2 | last ; | |||||||||||||||||||||||||||||||||||||||||
| 760 | } | ||||||||||||||||||||||||||||||||||||||||||
| 761 | } | ||||||||||||||||||||||||||||||||||||||||||
| 762 | |||||||||||||||||||||||||||||||||||||||||||
| 763 | 2 | ▶ | if ($msg) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 764 | { | ||||||||||||||||||||||||||||||||||||||||||
| 765 | 2 | ▶ | if ($DEBUG) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 766 | { | ||||||||||||||||||||||||||||||||||||||||||
| 767 | 0 | print "- - - - - - - - - - - - -\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 768 | 0 | print "- Return: " ; | |||||||||||||||||||||||||||||||||||||||||
| 769 | } | ||||||||||||||||||||||||||||||||||||||||||
| 770 | 2 | ▶ | print $ok ? "$ok\n" : "no\n" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 771 | } | ||||||||||||||||||||||||||||||||||||||||||
| 772 | |||||||||||||||||||||||||||||||||||||||||||
| 773 | 2 | ▶ | if ($DEBUG) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 774 | { | ||||||||||||||||||||||||||||||||||||||||||
| 775 | 0 | print "-------------------------\n\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 776 | } | ||||||||||||||||||||||||||||||||||||||||||
| 777 | |||||||||||||||||||||||||||||||||||||||||||
| 778 | 2 | return $ok ; | |||||||||||||||||||||||||||||||||||||||||
| 779 | } | ||||||||||||||||||||||||||||||||||||||||||
| 780 | |||||||||||||||||||||||||||||||||||||||||||
| 781 | |||||||||||||||||||||||||||||||||||||||||||
| 782 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 783 | sub c_inline | ||||||||||||||||||||||||||||||||||||||||||
| 784 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_inline: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 785 | 1 | my $code = <<'_ACEOF' ; | |||||||||||||||||||||||||||||||||||||||||
| 786 | #ifndef __cplusplus | ||||||||||||||||||||||||||||||||||||||||||
| 787 | typedef int foo_t; | ||||||||||||||||||||||||||||||||||||||||||
| 788 | static $ac_kw foo_t static_foo () {return 0; } | ||||||||||||||||||||||||||||||||||||||||||
| 789 | $ac_kw foo_t foo () {return 0; } | ||||||||||||||||||||||||||||||||||||||||||
| 790 | #endif | ||||||||||||||||||||||||||||||||||||||||||
| 791 | |||||||||||||||||||||||||||||||||||||||||||
| 792 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 793 | |||||||||||||||||||||||||||||||||||||||||||
| 794 | 1 | my $ac_c_inline = c_try_keywords('inline', 'checking for inline', $code, [qw/inline __inline__ __inline/]) ; | |||||||||||||||||||||||||||||||||||||||||
| 795 | 1 | return $ac_c_inline ; | |||||||||||||||||||||||||||||||||||||||||
| 796 | } | ||||||||||||||||||||||||||||||||||||||||||
| 797 | |||||||||||||||||||||||||||||||||||||||||||
| 798 | |||||||||||||||||||||||||||||||||||||||||||
| 799 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 800 | sub have_builtin_expect | ||||||||||||||||||||||||||||||||||||||||||
| 801 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
have_builtin_expect: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 802 | 1 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 803 | int foo (int a) | ||||||||||||||||||||||||||||||||||||||||||
| 804 | { | ||||||||||||||||||||||||||||||||||||||||||
| 805 | a = __builtin_expect (a, 10); | ||||||||||||||||||||||||||||||||||||||||||
| 806 | return a == 10 ? 0 : 1; | ||||||||||||||||||||||||||||||||||||||||||
| 807 | } | ||||||||||||||||||||||||||||||||||||||||||
| 808 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 809 | |||||||||||||||||||||||||||||||||||||||||||
| 810 | 1 | my $ok = c_try('expect', 'checking for builtin expect', $code, 1) ; | |||||||||||||||||||||||||||||||||||||||||
| 811 | |||||||||||||||||||||||||||||||||||||||||||
| 812 | 1 | ▶ | return $ok ? "#define HAVE_BUILTIN_EXPECT 1" : "" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 813 | } | ||||||||||||||||||||||||||||||||||||||||||
| 814 | |||||||||||||||||||||||||||||||||||||||||||
| 815 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 816 | sub have_lrintf | ||||||||||||||||||||||||||||||||||||||||||
| 817 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
have_lrintf: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 818 | 0 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 819 | #include <math.h> | ||||||||||||||||||||||||||||||||||||||||||
| 820 | int foo (double a) | ||||||||||||||||||||||||||||||||||||||||||
| 821 | { | ||||||||||||||||||||||||||||||||||||||||||
| 822 | long int b ; | ||||||||||||||||||||||||||||||||||||||||||
| 823 | |||||||||||||||||||||||||||||||||||||||||||
| 824 | b = lrintf(a); | ||||||||||||||||||||||||||||||||||||||||||
| 825 | return b == 10 ? 0 : 1; | ||||||||||||||||||||||||||||||||||||||||||
| 826 | } | ||||||||||||||||||||||||||||||||||||||||||
| 827 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 828 | |||||||||||||||||||||||||||||||||||||||||||
| 829 | 0 | my $ok = c_try('lrintf', 'checking for lrintf', $code, 1) ; | |||||||||||||||||||||||||||||||||||||||||
| 830 | |||||||||||||||||||||||||||||||||||||||||||
| 831 | 0 | ▶ | return $ok ? "#define HAVE_LRINTF 1" : "" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 832 | } | ||||||||||||||||||||||||||||||||||||||||||
| 833 | |||||||||||||||||||||||||||||||||||||||||||
| 834 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 835 | sub c_always_inline | ||||||||||||||||||||||||||||||||||||||||||
| 836 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_always_inline: called CC=3 SCAR=13.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 837 | 1 | my ($ac_c_inline) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 838 | |||||||||||||||||||||||||||||||||||||||||||
| 839 | 1 | my $ac_c_always_inline = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 840 | |||||||||||||||||||||||||||||||||||||||||||
| 841 | 1 | ▶ | if ( ($Config{'cc'} =~ /gcc$/) && ($ac_c_inline eq 'inline') ) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$Makeutils::Config{"cc"} =~ /gcc$/ and $ac_c_inline eq "inline"
MC/DC0%0/2
$Makeutils::Config{"cc"} =~ /gcc$/ and $ac_c_inline eq "inline"
$Makeutils::Config{"cc"} =~ /gcc$/
$ac_c_inline eq "inline"
Truth table33%1/3
A and B
A= $Makeutils::Config{"cc"} =~ /gcc$/B= $ac_c_inline eq "inline"
| |||||||||||||||||||||||||||||||||||||||||||
| 842 | { | ||||||||||||||||||||||||||||||||||||||||||
| 843 | 0 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 844 | |||||||||||||||||||||||||||||||||||||||||||
| 845 | #ifndef __cplusplus | ||||||||||||||||||||||||||||||||||||||||||
| 846 | #define inline $ac_c_inline | ||||||||||||||||||||||||||||||||||||||||||
| 847 | #endif | ||||||||||||||||||||||||||||||||||||||||||
| 848 | |||||||||||||||||||||||||||||||||||||||||||
| 849 | int | ||||||||||||||||||||||||||||||||||||||||||
| 850 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 851 | { | ||||||||||||||||||||||||||||||||||||||||||
| 852 | __attribute__ ((__always_inline__)) void f (void); | ||||||||||||||||||||||||||||||||||||||||||
| 853 | #ifdef __cplusplus | ||||||||||||||||||||||||||||||||||||||||||
| 854 | 42 = 42; // obviously illegal - we want c++ to fail here | ||||||||||||||||||||||||||||||||||||||||||
| 855 | #endif | ||||||||||||||||||||||||||||||||||||||||||
| 856 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 857 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 858 | } | ||||||||||||||||||||||||||||||||||||||||||
| 859 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 860 | |||||||||||||||||||||||||||||||||||||||||||
| 861 | 0 | $ac_c_always_inline = c_try('always_inline', 'checking for always_inline', $code, '__attribute__ ((__always_inline__))') ; | |||||||||||||||||||||||||||||||||||||||||
| 862 | } | ||||||||||||||||||||||||||||||||||||||||||
| 863 | |||||||||||||||||||||||||||||||||||||||||||
| 864 | 1 | return $ac_c_always_inline ; | |||||||||||||||||||||||||||||||||||||||||
| 865 | } | ||||||||||||||||||||||||||||||||||||||||||
| 866 | |||||||||||||||||||||||||||||||||||||||||||
| 867 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 868 | sub c_restrict | ||||||||||||||||||||||||||||||||||||||||||
| 869 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_restrict: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 870 | |||||||||||||||||||||||||||||||||||||||||||
| 871 | ## protect $ac_kw for expansion in c_try_keywords() | ||||||||||||||||||||||||||||||||||||||||||
| 872 | 1 | my $code = <<'_ACEOF' ; | |||||||||||||||||||||||||||||||||||||||||
| 873 | int | ||||||||||||||||||||||||||||||||||||||||||
| 874 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 875 | { | ||||||||||||||||||||||||||||||||||||||||||
| 876 | char * $ac_kw p; | ||||||||||||||||||||||||||||||||||||||||||
| 877 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 878 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 879 | } | ||||||||||||||||||||||||||||||||||||||||||
| 880 | |||||||||||||||||||||||||||||||||||||||||||
| 881 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 882 | |||||||||||||||||||||||||||||||||||||||||||
| 883 | 1 | my $ac_c_restrict = c_try_keywords('restrict', 'checking for restrict', $code, [qw/restrict __restrict__ __restrict/]) ; | |||||||||||||||||||||||||||||||||||||||||
| 884 | 1 | return $ac_c_restrict ; | |||||||||||||||||||||||||||||||||||||||||
| 885 | } | ||||||||||||||||||||||||||||||||||||||||||
| 886 | |||||||||||||||||||||||||||||||||||||||||||
| 887 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 888 | sub c_has_header | ||||||||||||||||||||||||||||||||||||||||||
| 889 | 14 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_has_header: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 890 | 14 | my ($header) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 891 | |||||||||||||||||||||||||||||||||||||||||||
| 892 | 14 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 893 | #include <$header> | ||||||||||||||||||||||||||||||||||||||||||
| 894 | |||||||||||||||||||||||||||||||||||||||||||
| 895 | typedef int foo_t; | ||||||||||||||||||||||||||||||||||||||||||
| 896 | static foo_t static_foo () {return 0; } | ||||||||||||||||||||||||||||||||||||||||||
| 897 | |||||||||||||||||||||||||||||||||||||||||||
| 898 | int | ||||||||||||||||||||||||||||||||||||||||||
| 899 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 900 | { | ||||||||||||||||||||||||||||||||||||||||||
| 901 | return static_foo() ; | ||||||||||||||||||||||||||||||||||||||||||
| 902 | } | ||||||||||||||||||||||||||||||||||||||||||
| 903 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 904 | |||||||||||||||||||||||||||||||||||||||||||
| 905 | 14 | my $ac_has_header = c_try($header, "checking for $header", $code, $header, '-Wall -Werror') ; | |||||||||||||||||||||||||||||||||||||||||
| 906 | 14 | return $ac_has_header ; | |||||||||||||||||||||||||||||||||||||||||
| 907 | } | ||||||||||||||||||||||||||||||||||||||||||
| 908 | |||||||||||||||||||||||||||||||||||||||||||
| 909 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 910 | sub c_has_function | ||||||||||||||||||||||||||||||||||||||||||
| 911 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_has_function: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 912 | 2 | my ($ac_func) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 913 | |||||||||||||||||||||||||||||||||||||||||||
| 914 | 2 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 915 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||||||||||||||||||||||||||||||||||||||||||
| 916 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||||||||||||||||||||||||||||||||||||||||||
| 917 | #define $ac_func innocuous_$ac_func | ||||||||||||||||||||||||||||||||||||||||||
| 918 | |||||||||||||||||||||||||||||||||||||||||||
| 919 | /* System header to define __stub macros and hopefully few prototypes, | ||||||||||||||||||||||||||||||||||||||||||
| 920 | which can conflict with char $ac_func (); below. | ||||||||||||||||||||||||||||||||||||||||||
| 921 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||||||||||||||||||||||||||||||||||||||||||
| 922 | <limits.h> exists even on freestanding compilers. */ | ||||||||||||||||||||||||||||||||||||||||||
| 923 | |||||||||||||||||||||||||||||||||||||||||||
| 924 | #ifdef __STDC__ | ||||||||||||||||||||||||||||||||||||||||||
| 925 | # include <limits.h> | ||||||||||||||||||||||||||||||||||||||||||
| 926 | #else | ||||||||||||||||||||||||||||||||||||||||||
| 927 | # include <assert.h> | ||||||||||||||||||||||||||||||||||||||||||
| 928 | #endif | ||||||||||||||||||||||||||||||||||||||||||
| 929 | |||||||||||||||||||||||||||||||||||||||||||
| 930 | #undef $ac_func | ||||||||||||||||||||||||||||||||||||||||||
| 931 | |||||||||||||||||||||||||||||||||||||||||||
| 932 | /* Override any GCC internal prototype to avoid an error. | ||||||||||||||||||||||||||||||||||||||||||
| 933 | Use char because int might match the return type of a GCC | ||||||||||||||||||||||||||||||||||||||||||
| 934 | builtin and then its argument prototype would still apply. */ | ||||||||||||||||||||||||||||||||||||||||||
| 935 | #ifdef __cplusplus | ||||||||||||||||||||||||||||||||||||||||||
| 936 | extern "C" | ||||||||||||||||||||||||||||||||||||||||||
| 937 | #endif | ||||||||||||||||||||||||||||||||||||||||||
| 938 | char $ac_func (); | ||||||||||||||||||||||||||||||||||||||||||
| 939 | /* The GNU C library defines this for functions which it implements | ||||||||||||||||||||||||||||||||||||||||||
| 940 | to always fail with ENOSYS. Some functions are actually named | ||||||||||||||||||||||||||||||||||||||||||
| 941 | something starting with __ and the normal name is an alias. */ | ||||||||||||||||||||||||||||||||||||||||||
| 942 | #if defined __stub_$ac_func || defined __stub___$ac_func | ||||||||||||||||||||||||||||||||||||||||||
| 943 | choke me | ||||||||||||||||||||||||||||||||||||||||||
| 944 | #endif | ||||||||||||||||||||||||||||||||||||||||||
| 945 | |||||||||||||||||||||||||||||||||||||||||||
| 946 | int | ||||||||||||||||||||||||||||||||||||||||||
| 947 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 948 | { | ||||||||||||||||||||||||||||||||||||||||||
| 949 | return $ac_func (); | ||||||||||||||||||||||||||||||||||||||||||
| 950 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 951 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 952 | } | ||||||||||||||||||||||||||||||||||||||||||
| 953 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 954 | |||||||||||||||||||||||||||||||||||||||||||
| 955 | # c_try_link($msg, $code, $ok_val, $cflags, $exec_out_ref, $ld_flags) ; | ||||||||||||||||||||||||||||||||||||||||||
| 956 | 2 | my $ac_has_function = c_try_link($ac_func, "checking for $ac_func", $code, $ac_func, '-Wall -Werror') ; | |||||||||||||||||||||||||||||||||||||||||
| 957 | 2 | return $ac_has_function ; | |||||||||||||||||||||||||||||||||||||||||
| 958 | } | ||||||||||||||||||||||||||||||||||||||||||
| 959 | |||||||||||||||||||||||||||||||||||||||||||
| 960 | |||||||||||||||||||||||||||||||||||||||||||
| 961 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 962 | sub c_has_math_function | ||||||||||||||||||||||||||||||||||||||||||
| 963 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_has_math_function: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 964 | 1 | my ($ac_func) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 965 | |||||||||||||||||||||||||||||||||||||||||||
| 966 | 1 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 967 | #include <math.h> | ||||||||||||||||||||||||||||||||||||||||||
| 968 | float foo(float f) { return $ac_func (f); } | ||||||||||||||||||||||||||||||||||||||||||
| 969 | int main (void) { return 0; } | ||||||||||||||||||||||||||||||||||||||||||
| 970 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 971 | |||||||||||||||||||||||||||||||||||||||||||
| 972 | # c_try_link($msg, $code, $ok_val, $cflags, $exec_out_ref, $ld_flags) ; | ||||||||||||||||||||||||||||||||||||||||||
| 973 | 1 | my $ac_has_function = c_try_link($ac_func, "checking for $ac_func", $code, $ac_func, '-Wall -Werror', undef, '-lm') ; | |||||||||||||||||||||||||||||||||||||||||
| 974 | 1 | return $ac_has_function ; | |||||||||||||||||||||||||||||||||||||||||
| 975 | } | ||||||||||||||||||||||||||||||||||||||||||
| 976 | |||||||||||||||||||||||||||||||||||||||||||
| 977 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 978 | sub c_replace_math_function | ||||||||||||||||||||||||||||||||||||||||||
| 979 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_replace_math_function: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 980 | 1 | my ($ac_func) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 981 | |||||||||||||||||||||||||||||||||||||||||||
| 982 | 1 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 983 | #include <math.h> | ||||||||||||||||||||||||||||||||||||||||||
| 984 | |||||||||||||||||||||||||||||||||||||||||||
| 985 | static inline long int $ac_func(float x) | ||||||||||||||||||||||||||||||||||||||||||
| 986 | { | ||||||||||||||||||||||||||||||||||||||||||
| 987 | return (int)(x); | ||||||||||||||||||||||||||||||||||||||||||
| 988 | } | ||||||||||||||||||||||||||||||||||||||||||
| 989 | |||||||||||||||||||||||||||||||||||||||||||
| 990 | float foo(float f) { return $ac_func (f); } | ||||||||||||||||||||||||||||||||||||||||||
| 991 | int main (void) { return 0; } | ||||||||||||||||||||||||||||||||||||||||||
| 992 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 993 | |||||||||||||||||||||||||||||||||||||||||||
| 994 | # c_try_link($msg, $code, $ok_val, $cflags, $exec_out_ref, $ld_flags) ; | ||||||||||||||||||||||||||||||||||||||||||
| 995 | 1 | my $ac_hasnt_function = c_try_link($ac_func, "", $code, $ac_func, '-Wall -Werror', undef, '-lm') ; | |||||||||||||||||||||||||||||||||||||||||
| 996 | 1 | return $ac_hasnt_function ; | |||||||||||||||||||||||||||||||||||||||||
| 997 | } | ||||||||||||||||||||||||||||||||||||||||||
| 998 | |||||||||||||||||||||||||||||||||||||||||||
| 999 | |||||||||||||||||||||||||||||||||||||||||||
| 1000 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1001 | sub c_struct_timeval | ||||||||||||||||||||||||||||||||||||||||||
| 1002 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
c_struct_timeval: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1003 | 1 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 1004 | #include <sys/time.h> | ||||||||||||||||||||||||||||||||||||||||||
| 1005 | #include <time.h> | ||||||||||||||||||||||||||||||||||||||||||
| 1006 | |||||||||||||||||||||||||||||||||||||||||||
| 1007 | typedef struct timeval ac__type_new_; | ||||||||||||||||||||||||||||||||||||||||||
| 1008 | int | ||||||||||||||||||||||||||||||||||||||||||
| 1009 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 1010 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1011 | if ((ac__type_new_ *) 0) | ||||||||||||||||||||||||||||||||||||||||||
| 1012 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 1013 | if (sizeof (ac__type_new_)) | ||||||||||||||||||||||||||||||||||||||||||
| 1014 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 1015 | ; | ||||||||||||||||||||||||||||||||||||||||||
| 1016 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 1017 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1018 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 1019 | |||||||||||||||||||||||||||||||||||||||||||
| 1020 | 1 | my $ac_struct_timeval = c_try('struct tmeval', "checking for struct timeval", $code, 1) ; | |||||||||||||||||||||||||||||||||||||||||
| 1021 | 1 | return $ac_struct_timeval ; | |||||||||||||||||||||||||||||||||||||||||
| 1022 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1023 | |||||||||||||||||||||||||||||||||||||||||||
| 1024 | |||||||||||||||||||||||||||||||||||||||||||
| 1025 | |||||||||||||||||||||||||||||||||||||||||||
| 1026 | |||||||||||||||||||||||||||||||||||||||||||
| 1027 | |||||||||||||||||||||||||||||||||||||||||||
| 1028 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1029 | sub check_new_version | ||||||||||||||||||||||||||||||||||||||||||
| 1030 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_new_version: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1031 | # my $version = ExtUtils::MM_Unix->parse_version("lib/$ModuleInfo{modpath}.pm"); | ||||||||||||||||||||||||||||||||||||||||||
| 1032 | |||||||||||||||||||||||||||||||||||||||||||
| 1033 | 0 | print "Installing Version: $ModuleInfo{version}\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1034 | |||||||||||||||||||||||||||||||||||||||||||
| 1035 | ## Check for newer version | ||||||||||||||||||||||||||||||||||||||||||
| 1036 | 0 | eval { | |||||||||||||||||||||||||||||||||||||||||
| 1037 | 0 | require LWP::UserAgent; | |||||||||||||||||||||||||||||||||||||||||
| 1038 | } ; | ||||||||||||||||||||||||||||||||||||||||||
| 1039 | 0 | ▶ | if (!$@) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1040 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1041 | 0 | print "Checking for later version...\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1042 | |||||||||||||||||||||||||||||||||||||||||||
| 1043 | ## specify user name so that I can filter out my builds | ||||||||||||||||||||||||||||||||||||||||||
| 1044 | 0 | ▶ | my $user = $ENV{USER} || $ENV{USERNAME} || 'nobody' ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/5
$ENV{'USER'} || $ENV{'USERNAME'} || 'nobody'
$ENV{"USER"} or $ENV{"USERNAME"}
MC/DC0%0/2
$ENV{'USER'} || $ENV{'USERNAME'} || 'nobody'
$ENV{"USER"}
$ENV{"USERNAME"}
Truth table0%0/3
A or B
A= $ENV{"USER"}B= $ENV{"USERNAME"}
| |||||||||||||||||||||||||||||||||||||||||||
| 1045 | |||||||||||||||||||||||||||||||||||||||||||
| 1046 | # CPAN testers | ||||||||||||||||||||||||||||||||||||||||||
| 1047 | 0 | ▶ | my $cpan = $ENV{'PERL5_CPAN_IS_RUNNING'}||0 ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$ENV{'PERL5_CPAN_IS_RUNNING'} || 0
MC/DC0%0/1
$ENV{'PERL5_CPAN_IS_RUNNING'} || 0
$ENV{'PERL5_CPAN_IS_RUNNING'}
Truth table0%0/2
A
A= $ENV{'PERL5_CPAN_IS_RUNNING'}
| |||||||||||||||||||||||||||||||||||||||||||
| 1048 | |||||||||||||||||||||||||||||||||||||||||||
| 1049 | ## check for OS-specific versions | ||||||||||||||||||||||||||||||||||||||||||
| 1050 | 0 | my $os = $^O ; | |||||||||||||||||||||||||||||||||||||||||
| 1051 | 0 | my $url = "http://quartz.homelinux.com/CPAN/index.php?ver=$ModuleInfo{version}&mod=$ModuleInfo{name}&user=$user&os=$os&cpan=$cpan" ; | |||||||||||||||||||||||||||||||||||||||||
| 1052 | |||||||||||||||||||||||||||||||||||||||||||
| 1053 | 0 | my $ua = LWP::UserAgent->new; | |||||||||||||||||||||||||||||||||||||||||
| 1054 | 0 | $ua->agent("CPAN-$ModuleInfo{name}/$ModuleInfo{version}") ; | |||||||||||||||||||||||||||||||||||||||||
| 1055 | 0 | $ua->timeout(10); | |||||||||||||||||||||||||||||||||||||||||
| 1056 | 0 | $ua->env_proxy; | |||||||||||||||||||||||||||||||||||||||||
| 1057 | |||||||||||||||||||||||||||||||||||||||||||
| 1058 | 0 | my $response = $ua->get($url); | |||||||||||||||||||||||||||||||||||||||||
| 1059 | 0 | ▶ | if ($response->is_success) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1060 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1061 | 0 | my $content = $response->content ; | |||||||||||||||||||||||||||||||||||||||||
| 1062 | 0 | ▶ | if ($content =~ m/Current version : ([\d\.]+)/m) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1063 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1064 | 0 | print "Latest CPAN version is $1\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1065 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1066 | 0 | ▶ | if ($content =~ m/Newer version/m) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1067 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1068 | 0 | print "** NOTE: A newer version than this is available. Please downloaded latest version **\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1069 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1070 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1071 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1072 | 0 | print "Got latest version\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1073 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1074 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1075 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1076 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1077 | 0 | print "Unable to connect, assuming latest\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1078 | #print $response->status_line; | ||||||||||||||||||||||||||||||||||||||||||
| 1079 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1080 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1081 | |||||||||||||||||||||||||||||||||||||||||||
| 1082 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1083 | |||||||||||||||||||||||||||||||||||||||||||
| 1084 | |||||||||||||||||||||||||||||||||||||||||||
| 1085 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1086 | sub check_largefile | ||||||||||||||||||||||||||||||||||||||||||
| 1087 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_largefile: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1088 | 1 | my $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 1089 | #include <unistd.h> | ||||||||||||||||||||||||||||||||||||||||||
| 1090 | |||||||||||||||||||||||||||||||||||||||||||
| 1091 | int | ||||||||||||||||||||||||||||||||||||||||||
| 1092 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 1093 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1094 | off64_t i = 0 ; | ||||||||||||||||||||||||||||||||||||||||||
| 1095 | |||||||||||||||||||||||||||||||||||||||||||
| 1096 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 1097 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1098 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 1099 | |||||||||||||||||||||||||||||||||||||||||||
| 1100 | 1 | $ModuleInfo{'config'}{'off64_t'} = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1101 | 1 | my $ac_off64_t = c_try('off64_t', "checking for off64_t support", $code, 1) ; | |||||||||||||||||||||||||||||||||||||||||
| 1102 | 1 | ▶ | if (!$ac_off64_t) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1103 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1104 | 1 | $ModuleInfo{'config'}{'off64_t'} = "#define off64_t off_t" ; | |||||||||||||||||||||||||||||||||||||||||
| 1105 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1106 | |||||||||||||||||||||||||||||||||||||||||||
| 1107 | |||||||||||||||||||||||||||||||||||||||||||
| 1108 | 1 | $code = <<_ACEOF ; | |||||||||||||||||||||||||||||||||||||||||
| 1109 | #include <unistd.h> | ||||||||||||||||||||||||||||||||||||||||||
| 1110 | #include <stdio.h> | ||||||||||||||||||||||||||||||||||||||||||
| 1111 | #include <fcntl.h> | ||||||||||||||||||||||||||||||||||||||||||
| 1112 | |||||||||||||||||||||||||||||||||||||||||||
| 1113 | $ModuleInfo{'config'}{'off64_t'} | ||||||||||||||||||||||||||||||||||||||||||
| 1114 | |||||||||||||||||||||||||||||||||||||||||||
| 1115 | int | ||||||||||||||||||||||||||||||||||||||||||
| 1116 | main () | ||||||||||||||||||||||||||||||||||||||||||
| 1117 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1118 | int fd = open("tmp.txt", O_RDONLY) ; | ||||||||||||||||||||||||||||||||||||||||||
| 1119 | off64_t size ; | ||||||||||||||||||||||||||||||||||||||||||
| 1120 | |||||||||||||||||||||||||||||||||||||||||||
| 1121 | size = lseek64(fd, -1, SEEK_END); | ||||||||||||||||||||||||||||||||||||||||||
| 1122 | printf("size=%lld", (long long int)size) ; | ||||||||||||||||||||||||||||||||||||||||||
| 1123 | |||||||||||||||||||||||||||||||||||||||||||
| 1124 | return 0; | ||||||||||||||||||||||||||||||||||||||||||
| 1125 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1126 | _ACEOF | ||||||||||||||||||||||||||||||||||||||||||
| 1127 | |||||||||||||||||||||||||||||||||||||||||||
| 1128 | 1 | $ModuleInfo{'config'}{'lseek64'} = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1129 | |||||||||||||||||||||||||||||||||||||||||||
| 1130 | # c_try_link($msg, $code, $ok_val, $cflags, $exec_out_ref, $ld_flags) ; | ||||||||||||||||||||||||||||||||||||||||||
| 1131 | 1 | my $ac_lseek64 = c_try_link('lseek64', "checking for lseek64", $code, 1) ; | |||||||||||||||||||||||||||||||||||||||||
| 1132 | 1 | ▶ | if (!$ac_lseek64) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1133 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1134 | 1 | $ModuleInfo{'config'}{'lseek64'} = "#define lseek64 lseek" ; | |||||||||||||||||||||||||||||||||||||||||
| 1135 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1136 | |||||||||||||||||||||||||||||||||||||||||||
| 1137 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1138 | |||||||||||||||||||||||||||||||||||||||||||
| 1139 | |||||||||||||||||||||||||||||||||||||||||||
| 1140 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1141 | sub have_h | ||||||||||||||||||||||||||||||||||||||||||
| 1142 | 14 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
have_h: called CC=7 SCAR=19.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1143 | 14 | my ($key, $header, $name, $val, $notval) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 1144 | |||||||||||||||||||||||||||||||||||||||||||
| 1145 | 14 | ▶ | $val = "1" unless defined($val) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1146 | 14 | ▶ | $notval = "" unless defined($notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1147 | |||||||||||||||||||||||||||||||||||||||||||
| 1148 | 14 | my $def ; | |||||||||||||||||||||||||||||||||||||||||
| 1149 | # if ($key && exists($Config{$key})) | ||||||||||||||||||||||||||||||||||||||||||
| 1150 | # { | ||||||||||||||||||||||||||||||||||||||||||
| 1151 | # $def = $Config{$key} ; | ||||||||||||||||||||||||||||||||||||||||||
| 1152 | # } | ||||||||||||||||||||||||||||||||||||||||||
| 1153 | |||||||||||||||||||||||||||||||||||||||||||
| 1154 | 14 | ▶ | if (!$def) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1155 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1156 | 14 | my $has = c_has_header($header) ; | |||||||||||||||||||||||||||||||||||||||||
| 1157 | 14 | ▶ | if ($has) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1158 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1159 | 13 | $def = 'define' ; | |||||||||||||||||||||||||||||||||||||||||
| 1160 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1161 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1162 | 14 | ▶ | if (!$def) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1163 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1164 | 1 | $def = 'undef' ; | |||||||||||||||||||||||||||||||||||||||||
| 1165 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1166 | |||||||||||||||||||||||||||||||||||||||||||
| 1167 | 14 | ▶ | my $str = "#$def $name " . ($def eq 'define' ? $val : $notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1168 | 14 | $ModuleInfo{'config'}{$name} = $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1169 | |||||||||||||||||||||||||||||||||||||||||||
| 1170 | 14 | return $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1171 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1172 | |||||||||||||||||||||||||||||||||||||||||||
| 1173 | |||||||||||||||||||||||||||||||||||||||||||
| 1174 | |||||||||||||||||||||||||||||||||||||||||||
| 1175 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1176 | sub have_d | ||||||||||||||||||||||||||||||||||||||||||
| 1177 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
have_d: called CC=5 SCAR=17.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1178 | 1 | my ($key, $name, $val, $notval) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 1179 | |||||||||||||||||||||||||||||||||||||||||||
| 1180 | 1 | ▶ | $val = "1" unless defined($val) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1181 | 1 | ▶ | $notval = "" unless defined($notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1182 | |||||||||||||||||||||||||||||||||||||||||||
| 1183 | 1 | ▶ | my $def = $Config{$key} || 'undef' ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition50%1/2
$Makeutils::Config{$key} || 'undef'
MC/DC0%0/1
$Makeutils::Config{$key} || 'undef'
$Makeutils::Config{$key}
Truth table50%1/2
A
A= $Makeutils::Config{$key}
| |||||||||||||||||||||||||||||||||||||||||||
| 1184 | 1 | ▶ | my $str = "#$def $name " . ($def eq 'define' ? $val : $notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1185 | 1 | $ModuleInfo{'config'}{$name} = $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1186 | |||||||||||||||||||||||||||||||||||||||||||
| 1187 | 1 | return $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1188 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1189 | |||||||||||||||||||||||||||||||||||||||||||
| 1190 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1191 | # Define if not available - otherwise don't define | ||||||||||||||||||||||||||||||||||||||||||
| 1192 | sub havent_d | ||||||||||||||||||||||||||||||||||||||||||
| 1193 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
havent_d: called CC=3 SCAR=11.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1194 | 2 | my ($key, $name, $val) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 1195 | |||||||||||||||||||||||||||||||||||||||||||
| 1196 | 2 | ▶ | $val = "" unless defined($val) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1197 | |||||||||||||||||||||||||||||||||||||||||||
| 1198 | 2 | my $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1199 | 2 | ▶ | if ($Config{$key} eq 'define') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1200 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1201 | 0 | $str = "/* #define $name $val */" | |||||||||||||||||||||||||||||||||||||||||
| 1202 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1203 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1204 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1205 | 2 | $str = "#define $name $val" | |||||||||||||||||||||||||||||||||||||||||
| 1206 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1207 | 2 | $ModuleInfo{'config'}{$name} = $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1208 | |||||||||||||||||||||||||||||||||||||||||||
| 1209 | 2 | return $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1210 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1211 | |||||||||||||||||||||||||||||||||||||||||||
| 1212 | |||||||||||||||||||||||||||||||||||||||||||
| 1213 | |||||||||||||||||||||||||||||||||||||||||||
| 1214 | |||||||||||||||||||||||||||||||||||||||||||
| 1215 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1216 | sub have_func | ||||||||||||||||||||||||||||||||||||||||||
| 1217 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
have_func: called CC=7 SCAR=20.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1218 | 2 | my ($key, $func, $name, $val, $notval) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 1219 | |||||||||||||||||||||||||||||||||||||||||||
| 1220 | 2 | ▶ | $val = "1" unless defined($val) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1221 | 2 | ▶ | $notval = "" unless defined($notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1222 | |||||||||||||||||||||||||||||||||||||||||||
| 1223 | 2 | my $def ; | |||||||||||||||||||||||||||||||||||||||||
| 1224 | # if ($key && exists($Config{$key})) | ||||||||||||||||||||||||||||||||||||||||||
| 1225 | # { | ||||||||||||||||||||||||||||||||||||||||||
| 1226 | # $def = $Config{$key} ; | ||||||||||||||||||||||||||||||||||||||||||
| 1227 | # } | ||||||||||||||||||||||||||||||||||||||||||
| 1228 | |||||||||||||||||||||||||||||||||||||||||||
| 1229 | 2 | ▶ | if (!$def) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1230 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1231 | 2 | my $has = c_has_function($func) ; | |||||||||||||||||||||||||||||||||||||||||
| 1232 | 2 | ▶ | if ($has) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1233 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1234 | 2 | $def = 'define' ; | |||||||||||||||||||||||||||||||||||||||||
| 1235 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1236 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1237 | 2 | ▶ | if (!$def) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1238 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1239 | 0 | $def = 'undef' ; | |||||||||||||||||||||||||||||||||||||||||
| 1240 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1241 | |||||||||||||||||||||||||||||||||||||||||||
| 1242 | 2 | ▶ | my $str = "#$def $name " . ($def eq 'define' ? $val : $notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1243 | 2 | $ModuleInfo{'config'}{$name} = $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1244 | |||||||||||||||||||||||||||||||||||||||||||
| 1245 | 2 | return $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1246 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1247 | |||||||||||||||||||||||||||||||||||||||||||
| 1248 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1249 | sub have_mathfunc | ||||||||||||||||||||||||||||||||||||||||||
| 1250 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
have_mathfunc: called CC=8 SCAR=22.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1251 | 1 | my ($key, $func, $name, $val, $notval) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 1252 | |||||||||||||||||||||||||||||||||||||||||||
| 1253 | 1 | ▶ | $val = "1" unless defined($val) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1254 | 1 | ▶ | $notval = "" unless defined($notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1255 | |||||||||||||||||||||||||||||||||||||||||||
| 1256 | 1 | my $def ; | |||||||||||||||||||||||||||||||||||||||||
| 1257 | 1 | ▶ | if (!$def) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1258 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1259 | 1 | my $has = c_has_math_function($func) ; | |||||||||||||||||||||||||||||||||||||||||
| 1260 | 1 | ▶ | if ($has) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1261 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1262 | 0 | $def = 'define' ; | |||||||||||||||||||||||||||||||||||||||||
| 1263 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1264 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1265 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1266 | # extra check to ensure it's not a false negative(?) | ||||||||||||||||||||||||||||||||||||||||||
| 1267 | 1 | my $hasnt = c_replace_math_function($func) ; | |||||||||||||||||||||||||||||||||||||||||
| 1268 | 1 | ▶ | if (!$hasnt) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1269 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1270 | # Failed, so we have really got it? | ||||||||||||||||||||||||||||||||||||||||||
| 1271 | 1 | $def = 'define' ; | |||||||||||||||||||||||||||||||||||||||||
| 1272 | 1 | $ModuleInfo{'COMMENTS'}{$name} = 'failed check of replacement' ; | |||||||||||||||||||||||||||||||||||||||||
| 1273 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1274 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1275 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1276 | 1 | ▶ | if (!$def) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1277 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1278 | 0 | $def = 'undef' ; | |||||||||||||||||||||||||||||||||||||||||
| 1279 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1280 | |||||||||||||||||||||||||||||||||||||||||||
| 1281 | 1 | ▶ | my $str = "#$def $name " . ($def eq 'define' ? $val : $notval) ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1282 | 1 | $ModuleInfo{'config'}{$name} = $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1283 | |||||||||||||||||||||||||||||||||||||||||||
| 1284 | 1 | return $str ; | |||||||||||||||||||||||||||||||||||||||||
| 1285 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1286 | |||||||||||||||||||||||||||||||||||||||||||
| 1287 | |||||||||||||||||||||||||||||||||||||||||||
| 1288 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1289 | sub _chk_arch_name | ||||||||||||||||||||||||||||||||||||||||||
| 1290 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_chk_arch_name: called CC=9 SCAR=34.2
| |||||||||||||||||||||||||||||||||||||||||||
| 1291 | 1 | my ($arch_name) = @_ ; | |||||||||||||||||||||||||||||||||||||||||
| 1292 | |||||||||||||||||||||||||||||||||||||||||||
| 1293 | 1 | my $arch = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1294 | |||||||||||||||||||||||||||||||||||||||||||
| 1295 | 1 | ▶ | if ($arch_name =~ /ppc\-.*|powerpc\-.*/i) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 8 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 1296 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1297 | 0 | $arch = "ARCH_PPC" ; | |||||||||||||||||||||||||||||||||||||||||
| 1298 | |||||||||||||||||||||||||||||||||||||||||||
| 1299 | # altivec? | ||||||||||||||||||||||||||||||||||||||||||
| 1300 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1301 | elsif ($arch_name =~ /sparc\-*|sparc64\-.*/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1302 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1303 | 0 | $arch = "ARCH_SPARC" ; | |||||||||||||||||||||||||||||||||||||||||
| 1304 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1305 | elsif ($arch_name =~ /alpha.*/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1306 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1307 | 0 | $arch = "ARCH_ALPHA" ; | |||||||||||||||||||||||||||||||||||||||||
| 1308 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1309 | elsif ($arch_name =~ /arm.*/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1310 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1311 | 0 | $arch = "ARCH_ARM" ; | |||||||||||||||||||||||||||||||||||||||||
| 1312 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1313 | elsif ($arch_name =~ /i.86\-.*|k.\-.*|x86_64\-.*|x86\-.*|amd64\-.*|x86/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1314 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1315 | 1 | $arch = "ARCH_X86" ; | |||||||||||||||||||||||||||||||||||||||||
| 1316 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1317 | |||||||||||||||||||||||||||||||||||||||||||
| 1318 | # keep trying with slightly relaxed regexps | ||||||||||||||||||||||||||||||||||||||||||
| 1319 | elsif ($arch_name =~ /ppc.*|powerpc.*/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1320 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1321 | 0 | $arch = "ARCH_PPC" ; | |||||||||||||||||||||||||||||||||||||||||
| 1322 | |||||||||||||||||||||||||||||||||||||||||||
| 1323 | # altivec? | ||||||||||||||||||||||||||||||||||||||||||
| 1324 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1325 | elsif ($arch_name =~ /sparc*|sparc64.*/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1326 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1327 | 0 | $arch = "ARCH_SPARC" ; | |||||||||||||||||||||||||||||||||||||||||
| 1328 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1329 | elsif ($arch_name =~ /i.86.*|x86_64.*|x86.*|amd64.*|x86/i) | ||||||||||||||||||||||||||||||||||||||||||
| 1330 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1331 | 0 | $arch = "ARCH_X86" ; | |||||||||||||||||||||||||||||||||||||||||
| 1332 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1333 | |||||||||||||||||||||||||||||||||||||||||||
| 1334 | 1 | return $arch ; | |||||||||||||||||||||||||||||||||||||||||
| 1335 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1336 | |||||||||||||||||||||||||||||||||||||||||||
| 1337 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1338 | sub arch_name | ||||||||||||||||||||||||||||||||||||||||||
| 1339 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
arch_name: called CC=5 SCAR=21.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1340 | 1 | my $arch = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1341 | 1 | $ModuleInfo{'COMMENTS'}{'ARCH'} = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1342 | |||||||||||||||||||||||||||||||||||||||||||
| 1343 | ## use %Config first | ||||||||||||||||||||||||||||||||||||||||||
| 1344 | 1 | my $arch_name = $Config{'archname'} ; | |||||||||||||||||||||||||||||||||||||||||
| 1345 | 1 | $arch = _chk_arch_name($arch_name) ; | |||||||||||||||||||||||||||||||||||||||||
| 1346 | 1 | $ModuleInfo{'COMMENTS'}{'ARCH'} = "archname = $arch_name" ; | |||||||||||||||||||||||||||||||||||||||||
| 1347 | |||||||||||||||||||||||||||||||||||||||||||
| 1348 | 1 | ▶ | if (!$arch) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1349 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1350 | ## Failed, so attempt to run uname | ||||||||||||||||||||||||||||||||||||||||||
| 1351 | 0 | ▶ | if ($^O ne 'MSWin32') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1352 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1353 | 0 | $arch_name = `uname -a` ; | |||||||||||||||||||||||||||||||||||||||||
| 1354 | 0 | chomp $arch_name ; | |||||||||||||||||||||||||||||||||||||||||
| 1355 | 0 | $arch = _chk_arch_name($arch_name) ; | |||||||||||||||||||||||||||||||||||||||||
| 1356 | 0 | $ModuleInfo{'COMMENTS'}{'ARCH'} = "uname = $arch_name" ; | |||||||||||||||||||||||||||||||||||||||||
| 1357 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1358 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1359 | |||||||||||||||||||||||||||||||||||||||||||
| 1360 | ## Catch-all if everything else has failed... | ||||||||||||||||||||||||||||||||||||||||||
| 1361 | 1 | ▶ | if (!$arch) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1362 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1363 | 0 | $arch = "ARCH_X86" ; | |||||||||||||||||||||||||||||||||||||||||
| 1364 | 0 | ▶ | $ModuleInfo{'COMMENTS'}{'ARCH'} ||= "Unable to determine" ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$Makeutils::ModuleInfo{"COMMENTS"}{"ARCH"} ||= "Unable to determine"
MC/DC0%0/1
$Makeutils::ModuleInfo{"COMMENTS"}{"ARCH"} ||= "Unable to determine"
$Makeutils::ModuleInfo{"COMMENTS"}{"ARCH"}
Truth table0%0/2
A
A= $Makeutils::ModuleInfo{"COMMENTS"}{"ARCH"}
| |||||||||||||||||||||||||||||||||||||||||||
| 1365 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1366 | |||||||||||||||||||||||||||||||||||||||||||
| 1367 | 1 | $ModuleInfo{'config'}{'ARCH'} = $arch ; | |||||||||||||||||||||||||||||||||||||||||
| 1368 | |||||||||||||||||||||||||||||||||||||||||||
| 1369 | 1 | return $arch ; | |||||||||||||||||||||||||||||||||||||||||
| 1370 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1371 | |||||||||||||||||||||||||||||||||||||||||||
| 1372 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1373 | sub get_align | ||||||||||||||||||||||||||||||||||||||||||
| 1374 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_align: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1375 | 1 | $ModuleInfo{'config'}{'ALIGN_BYTES'} = $Config{'alignbytes'} * 8 ; | |||||||||||||||||||||||||||||||||||||||||
| 1376 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1377 | |||||||||||||||||||||||||||||||||||||||||||
| 1378 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1379 | sub get_size_t | ||||||||||||||||||||||||||||||||||||||||||
| 1380 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_size_t: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1381 | 1 | ▶ | $ModuleInfo{'config'}{'size_t'} = $Config{'sizetype'} eq 'size_t' ? "" : "#define size_t unsigned int" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1382 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1383 | |||||||||||||||||||||||||||||||||||||||||||
| 1384 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1385 | sub get_endian | ||||||||||||||||||||||||||||||||||||||||||
| 1386 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_endian: called CC=4 SCAR=18.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1387 | 1 | my $ENDIAN = " | |||||||||||||||||||||||||||||||||||||||||
| 1388 | #undef WORDS_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1389 | #undef SHORT_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1390 | #undef WORDS_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1391 | #undef SHORT_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1392 | " ; | ||||||||||||||||||||||||||||||||||||||||||
| 1393 | 1 | ▶ | if ($Config{'byteorder'} =~ /^1/) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1394 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1395 | # little | ||||||||||||||||||||||||||||||||||||||||||
| 1396 | 1 | ▶ | if ($Config{'byteorder'} eq '12345678') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1397 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1398 | # words | ||||||||||||||||||||||||||||||||||||||||||
| 1399 | 1 | $ENDIAN = " | |||||||||||||||||||||||||||||||||||||||||
| 1400 | #undef WORDS_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1401 | #undef SHORT_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1402 | #define WORDS_LITTLEENDIAN 1 | ||||||||||||||||||||||||||||||||||||||||||
| 1403 | #undef SHORT_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1404 | " ; | ||||||||||||||||||||||||||||||||||||||||||
| 1405 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1406 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1407 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1408 | 0 | $ENDIAN = " | |||||||||||||||||||||||||||||||||||||||||
| 1409 | #undef WORDS_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1410 | #undef SHORT_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1411 | #undef WORDS_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1412 | #define SHORT_LITTLEENDIAN 1 | ||||||||||||||||||||||||||||||||||||||||||
| 1413 | " ; | ||||||||||||||||||||||||||||||||||||||||||
| 1414 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1415 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1416 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1417 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1418 | # big | ||||||||||||||||||||||||||||||||||||||||||
| 1419 | 0 | ▶ | if ($Config{'byteorder'} eq '87654321') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1420 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1421 | # words | ||||||||||||||||||||||||||||||||||||||||||
| 1422 | 0 | $ENDIAN = " | |||||||||||||||||||||||||||||||||||||||||
| 1423 | #define WORDS_BIGENDIAN 1 | ||||||||||||||||||||||||||||||||||||||||||
| 1424 | #undef SHORT_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1425 | #undef WORDS_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1426 | #undef SHORT_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1427 | " ; | ||||||||||||||||||||||||||||||||||||||||||
| 1428 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1429 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1430 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1431 | 0 | $ENDIAN = " | |||||||||||||||||||||||||||||||||||||||||
| 1432 | #undef WORDS_BIGENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1433 | #define SHORT_BIGENDIAN 1 | ||||||||||||||||||||||||||||||||||||||||||
| 1434 | #undef WORDS_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1435 | #undef SHORT_LITTLEENDIAN | ||||||||||||||||||||||||||||||||||||||||||
| 1436 | " ; | ||||||||||||||||||||||||||||||||||||||||||
| 1437 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1438 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1439 | 1 | $ModuleInfo{'config'}{'ENDIAN'} = $ENDIAN ; | |||||||||||||||||||||||||||||||||||||||||
| 1440 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1441 | |||||||||||||||||||||||||||||||||||||||||||
| 1442 | |||||||||||||||||||||||||||||||||||||||||||
| 1443 | ##------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1444 | sub get_config | ||||||||||||||||||||||||||||||||||||||||||
| 1445 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_config: called CC=6 SCAR=18.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1446 | 1 | $ModuleInfo{'config'} = {} ; | |||||||||||||||||||||||||||||||||||||||||
| 1447 | |||||||||||||||||||||||||||||||||||||||||||
| 1448 | # Arch | ||||||||||||||||||||||||||||||||||||||||||
| 1449 | 1 | arch_name() ; | |||||||||||||||||||||||||||||||||||||||||
| 1450 | |||||||||||||||||||||||||||||||||||||||||||
| 1451 | # OS | ||||||||||||||||||||||||||||||||||||||||||
| 1452 | 1 | $ModuleInfo{'config'}{'OS'} = uc("OS_" . $^O) ; | |||||||||||||||||||||||||||||||||||||||||
| 1453 | |||||||||||||||||||||||||||||||||||||||||||
| 1454 | # Alignment | ||||||||||||||||||||||||||||||||||||||||||
| 1455 | 1 | get_align() ; | |||||||||||||||||||||||||||||||||||||||||
| 1456 | |||||||||||||||||||||||||||||||||||||||||||
| 1457 | # Have ... | ||||||||||||||||||||||||||||||||||||||||||
| 1458 | 1 | have_func('d_ftime', 'ftime', 'HAVE_FTIME') ; | |||||||||||||||||||||||||||||||||||||||||
| 1459 | 1 | have_func('d_gettimeod', 'gettimeofday', 'HAVE_GETTIMEOFDAY') ; | |||||||||||||||||||||||||||||||||||||||||
| 1460 | 1 | have_mathfunc('', 'lrintf', 'HAVE_LRINTF') ; | |||||||||||||||||||||||||||||||||||||||||
| 1461 | |||||||||||||||||||||||||||||||||||||||||||
| 1462 | 1 | have_h('i_inttypes', 'inttypes.h', 'HAVE_INTTYPES_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1463 | 1 | have_h('', 'io.h', 'HAVE_IO_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1464 | 1 | have_h('i_memory', 'memory.h', 'HAVE_MEMORY_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1465 | 1 | have_h('', 'stdint.h', 'HAVE_STDINT_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1466 | 1 | have_h('i_stdlib', 'stdlib.h', 'HAVE_STDLIB_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1467 | 1 | have_h('', 'strings.h', 'HAVE_STRINGS_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1468 | 1 | have_h('i_string', 'string.h', 'HAVE_STRING_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1469 | 1 | have_h('i_sysstat', 'sys/stat.h', 'HAVE_SYS_STAT_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1470 | 1 | have_h('', 'sys/timeb.h', 'HAVE_SYS_TIMEB_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1471 | 1 | have_h('i_systime', 'sys/time.h', 'HAVE_SYS_TIME_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1472 | 1 | have_h('i_systypes', 'sys/types.h', 'HAVE_SYS_TYPES_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1473 | 1 | have_h('i_time', 'time.h', 'HAVE_TIME_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1474 | 1 | have_h('i_unistd', 'unistd.h', 'HAVE_UNISTD_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1475 | 1 | have_h('', 'getopt.h', 'HAVE_GETOPT_H') ; | |||||||||||||||||||||||||||||||||||||||||
| 1476 | |||||||||||||||||||||||||||||||||||||||||||
| 1477 | |||||||||||||||||||||||||||||||||||||||||||
| 1478 | # TODO: convert to live checks.... | ||||||||||||||||||||||||||||||||||||||||||
| 1479 | 1 | have_d('uselargefiles', '_LARGE_FILES') ; | |||||||||||||||||||||||||||||||||||||||||
| 1480 | 1 | havent_d('d_const', 'const') ; | |||||||||||||||||||||||||||||||||||||||||
| 1481 | 1 | get_size_t() ; | |||||||||||||||||||||||||||||||||||||||||
| 1482 | 1 | havent_d('d_volatile', 'volatile') ; | |||||||||||||||||||||||||||||||||||||||||
| 1483 | |||||||||||||||||||||||||||||||||||||||||||
| 1484 | # Endian | ||||||||||||||||||||||||||||||||||||||||||
| 1485 | 1 | get_endian() ; | |||||||||||||||||||||||||||||||||||||||||
| 1486 | |||||||||||||||||||||||||||||||||||||||||||
| 1487 | # inline ? | ||||||||||||||||||||||||||||||||||||||||||
| 1488 | 1 | my $ac_c_inline = c_inline() ; | |||||||||||||||||||||||||||||||||||||||||
| 1489 | 1 | my $ac_c_always_inline = c_always_inline($ac_c_inline) ; | |||||||||||||||||||||||||||||||||||||||||
| 1490 | 1 | ▶ | my $inline = $ac_c_always_inline || $ac_c_inline || "" ; | ||||||||||||||||||||||||||||||||||||||||
|
Condition40%2/5
$ac_c_always_inline || $ac_c_inline || ''
$ac_c_always_inline or $ac_c_inline
MC/DC0%0/2
$ac_c_always_inline || $ac_c_inline || ''
$ac_c_always_inline
$ac_c_inline
Truth table33%1/3
A or B
A= $ac_c_always_inlineB= $ac_c_inline
| |||||||||||||||||||||||||||||||||||||||||||
| 1491 | 1 | ▶ | if ($inline eq 'inline') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1492 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1493 | 1 | $ModuleInfo{'config'}{'inline'} = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1494 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1495 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1496 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1497 | 0 | $ModuleInfo{'config'}{'inline'} = "#define inline $inline" ; | |||||||||||||||||||||||||||||||||||||||||
| 1498 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1499 | |||||||||||||||||||||||||||||||||||||||||||
| 1500 | # restrict ? | ||||||||||||||||||||||||||||||||||||||||||
| 1501 | 1 | $ModuleInfo{'config'}{'restrict'} = c_restrict() ; | |||||||||||||||||||||||||||||||||||||||||
| 1502 | |||||||||||||||||||||||||||||||||||||||||||
| 1503 | |||||||||||||||||||||||||||||||||||||||||||
| 1504 | # timeval | ||||||||||||||||||||||||||||||||||||||||||
| 1505 | 1 | my $ac_struct_timeval = c_struct_timeval() ; | |||||||||||||||||||||||||||||||||||||||||
| 1506 | 1 | ▶ | $ModuleInfo{'config'}{'HAVE_STRUCT_TIMEVAL'} = $ac_struct_timeval ? "#define HAVE_STRUCT_TIMEVAL 1" : "#undef HAVE_STRUCT_TIMEVAL" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1507 | |||||||||||||||||||||||||||||||||||||||||||
| 1508 | # signal_t | ||||||||||||||||||||||||||||||||||||||||||
| 1509 | 1 | ▶ | $ModuleInfo{'config'}{'RETSIGTYPE'} = $Config{'signal_t'} ? "#define RETSIGTYPE $Config{'signal_t'}" : "#define RETSIGTYPE void" ; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1510 | |||||||||||||||||||||||||||||||||||||||||||
| 1511 | # Builtin... | ||||||||||||||||||||||||||||||||||||||||||
| 1512 | 1 | $ModuleInfo{'config'}{'HAVE_BUILTIN_EXPECT'} = have_builtin_expect() ; | |||||||||||||||||||||||||||||||||||||||||
| 1513 | |||||||||||||||||||||||||||||||||||||||||||
| 1514 | # Large file support | ||||||||||||||||||||||||||||||||||||||||||
| 1515 | 1 | check_largefile() ; | |||||||||||||||||||||||||||||||||||||||||
| 1516 | |||||||||||||||||||||||||||||||||||||||||||
| 1517 | 1 | return %{$ModuleInfo{'config'}} ; | |||||||||||||||||||||||||||||||||||||||||
| 1518 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1519 | |||||||||||||||||||||||||||||||||||||||||||
| 1520 | #----------------------------------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 1521 | sub get_makemakerdflt | ||||||||||||||||||||||||||||||||||||||||||
| 1522 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
get_makemakerdflt: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 1523 | 0 | my $make =<<MAKEMAKERDFLT; | |||||||||||||||||||||||||||||||||||||||||
| 1524 | |||||||||||||||||||||||||||||||||||||||||||
| 1525 | ## Show config | ||||||||||||||||||||||||||||||||||||||||||
| 1526 | makemakerdflt : showconfig all | ||||||||||||||||||||||||||||||||||||||||||
| 1527 | \$(NOECHO) \$(NOOP) | ||||||||||||||||||||||||||||||||||||||||||
| 1528 | |||||||||||||||||||||||||||||||||||||||||||
| 1529 | showconfig : FORCE | ||||||||||||||||||||||||||||||||||||||||||
| 1530 | \$(NOECHO) \$(ECHO) "==================================================================" | ||||||||||||||||||||||||||||||||||||||||||
| 1531 | \$(NOECHO) \$(ECHO) "== CONFIG ==" | ||||||||||||||||||||||||||||||||||||||||||
| 1532 | \$(NOECHO) \$(ECHO) "==================================================================" | ||||||||||||||||||||||||||||||||||||||||||
| 1533 | \$(NOECHO) \$(ECHO) "(Makeutils.pm version $VERSION)" | ||||||||||||||||||||||||||||||||||||||||||
| 1534 | MAKEMAKERDFLT | ||||||||||||||||||||||||||||||||||||||||||
| 1535 | |||||||||||||||||||||||||||||||||||||||||||
| 1536 | 0 | foreach my $var (sort keys %{$ModuleInfo{'config'}}) | |||||||||||||||||||||||||||||||||||||||||
| 1537 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1538 | 0 | my $padded = sprintf "%-24s", "$var:" ; | |||||||||||||||||||||||||||||||||||||||||
| 1539 | 0 | my $val = $ModuleInfo{'config'}{$var} ; | |||||||||||||||||||||||||||||||||||||||||
| 1540 | |||||||||||||||||||||||||||||||||||||||||||
| 1541 | ## Special cases | ||||||||||||||||||||||||||||||||||||||||||
| 1542 | |||||||||||||||||||||||||||||||||||||||||||
| 1543 | # ENDIAN is multi-line | ||||||||||||||||||||||||||||||||||||||||||
| 1544 | 0 | ▶ | if ($var eq 'ENDIAN') | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1545 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1546 | 0 | ▶ | if ($val =~ m/#define (\w+)/) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 1547 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1548 | 0 | $val = "#define $1 1" ; | |||||||||||||||||||||||||||||||||||||||||
| 1549 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1550 | else | ||||||||||||||||||||||||||||||||||||||||||
| 1551 | { | ||||||||||||||||||||||||||||||||||||||||||
| 1552 | 0 | $val = "" ; | |||||||||||||||||||||||||||||||||||||||||
| 1553 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1554 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1555 | |||||||||||||||||||||||||||||||||||||||||||
| 1556 | # Check for comment | ||||||||||||||||||||||||||||||||||||||||||
| 1557 | # if (exists($ModuleInfo{'COMMENTS'}{$var})) | ||||||||||||||||||||||||||||||||||||||||||
| 1558 | # { | ||||||||||||||||||||||||||||||||||||||||||
| 1559 | # $val .= " ($ModuleInfo{'COMMENTS'}{$var})" ; | ||||||||||||||||||||||||||||||||||||||||||
| 1560 | # } | ||||||||||||||||||||||||||||||||||||||||||
| 1561 | 0 | $make .= "\t\$(NOECHO) \$(ECHO) \"$padded $val\"\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1562 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1563 | 0 | $make .= "\t\$(NOECHO) \$(ECHO) \"==================================================================\"\n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1564 | 0 | $make .= "\t\$(NOECHO) \$(ECHO) \"==\" \n" ; | |||||||||||||||||||||||||||||||||||||||||
| 1565 | |||||||||||||||||||||||||||||||||||||||||||
| 1566 | 0 | return $make ; | |||||||||||||||||||||||||||||||||||||||||
| 1567 | } | ||||||||||||||||||||||||||||||||||||||||||
| 1568 | |||||||||||||||||||||||||||||||||||||||||||
| 1569 | |||||||||||||||||||||||||||||||||||||||||||
| 1570 | |||||||||||||||||||||||||||||||||||||||||||
| 1571 | |||||||||||||||||||||||||||||||||||||||||||
| 1572 | # ============================================================================================ | ||||||||||||||||||||||||||||||||||||||||||
| 1573 | # END OF PACKAGE | ||||||||||||||||||||||||||||||||||||||||||
| 1574 | |||||||||||||||||||||||||||||||||||||||||||
| 1575 | |||||||||||||||||||||||||||||||||||||||||||
| 1576 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 1577 | |||||||||||||||||||||||||||||||||||||||||||
| 1578 | __END__ | ||||||||||||||||||||||||||||||||||||||||||