Skip to content

Commit

Permalink
Enable and fix warnings in infrastructure/makebuildenv.pl
Browse files Browse the repository at this point in the history
  • Loading branch information
qris committed Nov 11, 2017
1 parent 0db4438 commit 3e5cfc5
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions infrastructure/makebuildenv.pl.in
@@ -1,4 +1,6 @@
#!@PERL@

use warnings;
use strict;
use Symbol;

Expand Down Expand Up @@ -156,7 +158,7 @@ mkdir "debug",0755;

# is the library code in another directory?
my $external_lib = readlink('lib');
if($external_lib ne '')
if(defined $external_lib and $external_lib ne '')
{
# adjust to root of the library distribution
$external_lib =~ s!/lib\Z!!;
Expand Down Expand Up @@ -234,9 +236,12 @@ for(@modules_files)
for(@deps_i)
{
my ($dep,$exclude_from) = split /!/;
$exclude_from = '' if not defined $exclude_from;

# generic library translation
$dep = $env_flags{'LIBTRANS_'.$dep} if exists($env_flags{'LIBTRANS_'.$dep});
next if $dep eq '';

if($exclude_from =~ m/\A\+(.+)\Z/)
{
$exclude_from = $1;
Expand Down Expand Up @@ -281,12 +286,15 @@ for(@modules_files)

# make directories, but not if we're using an external library and this a library module
my ($s,$d) = split /\//,$mod;
if ($s ne 'lib' or $external_lib eq '')
if (defined $s and ($s ne 'lib' or not defined $external_lib))
{
mkdir "release/$s",0755;
mkdir "release/$s/$d",0755;
mkdir "debug/$s",0755;
mkdir "debug/$s/$d",0755;
if (defined $d)
{
mkdir "release/$s/$d",0755;
mkdir "debug/$s/$d",0755;
}
}
}

Expand Down Expand Up @@ -630,7 +638,7 @@ __E
{
writetestfile("$mod/t-gdb",
"echo 'No debugger was detected by configure script'\n".
"exit 2");
"exit 2", "#");
}
}

Expand Down Expand Up @@ -785,9 +793,9 @@ __E
my %headers;
for my $h (grep /\.h\Z/i, @items)
{
open FL,"$mod/$h";
open FL,"$h" or die "$h: $!";
my $f;
read FL,$f,-s "$mod/$h";
read FL,$f,-s "$h";
close FL;

while($f =~ m/\#include\s+"([^"]+?)"/g)
Expand Down

0 comments on commit 3e5cfc5

Please sign in to comment.