Skip to content

Commit

Permalink
Windows: don't install __DECC_*.H
Browse files Browse the repository at this point in the history
This adds the possibility to exclude files by regexp in util/copy.pl

Partial fix for #3254

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from openssl/openssl#6303)
  • Loading branch information
levitte committed May 20, 2018
1 parent 6439e34 commit 246bd8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Configurations/windows-makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ install_dev:
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\ms\applink.c" \
"$(INSTALLTOP)\include\openssl"
@rem {- output_on() unless grep { $_ eq "OPENSSL_USE_APPLINK" } @{$config{defines}}; "" -}
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\include\openssl\*.h" \
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "-exclude_re=/__DECC_" \
"$(SRCDIR)\include\openssl\*.h" \
"$(INSTALLTOP)\include\openssl"
@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\include\openssl\*.h \
"$(INSTALLTOP)\include\openssl"
Expand Down
10 changes: 8 additions & 2 deletions util/copy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,24 @@
my $stripcr = 0;

my $arg;
my @excludes = ();

foreach $arg (@ARGV) {
if ($arg eq "-stripcr")
{
$stripcr = 1;
next;
}
if ($arg =~ /^-exclude_re=(.*)$/)
{
push @excludes, $1;
next;
}
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
$arg = qq("$arg") if ($arg =~ /\s/); # compensate for bug in 5.10...
foreach (glob $arg)
foreach my $f (glob $arg)
{
push @filelist, $_;
push @filelist, $f unless grep { $f =~ /$_/ } @excludes;
}
}

Expand Down

0 comments on commit 246bd8f

Please sign in to comment.