remove the now useless -noshared option; ok espie@

This commit is contained in:
naddy 2016-04-04 17:12:58 +00:00
parent 59666f3dc6
commit ff629cbf3e
2 changed files with 7 additions and 16 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/perl
# $OpenBSD: resolve-lib,v 1.5 2014/03/18 20:39:45 espie Exp $
# $OpenBSD: resolve-lib,v 1.6 2016/04/04 17:12:58 naddy Exp $
#
# Copyright (c) 2001-2010 Marc Espie <espie@openbsd.org>
#
@ -32,12 +32,12 @@ use OpenBSD::Paths;
my $LOCALBASE = $ENV{LOCALBASE} // '/usr/local';
my $error = 0;
my ($noshared, $needed, $silent) = @_;
my ($needed, $silent) = @_;
my $emited = {};
sub solve_spec
{
my ($spec, $noshared, $repo) = @_;
my ($spec, $repo) = @_;
my $r = $spec->findbest($repo, $LOCALBASE);
if ($needed) {
if (!defined $r || $r->is_static) {
@ -63,10 +63,7 @@ sub solve_spec
# Grab arguments
while (@ARGV > 0) {
if ($ARGV[0] eq '-noshared') {
$noshared = 1;
shift;
} elsif ($ARGV[0] eq '-needed') {
if ($ARGV[0] eq '-needed') {
$needed = 1;
$error = 1;
shift;
@ -86,7 +83,6 @@ while(<STDIN>) {
for my $s (split(/\s+/, $_)) {
my $lib = OpenBSD::Library::Build->from_string($s);
next if !$lib->is_valid;
next if $noshared and !$lib->is_static;
$repo->register($lib, 1);
}
}
@ -96,7 +92,7 @@ for my $s (@ARGV) {
my $spec = OpenBSD::LibSpec::Build->from_string($s);
next if $done->{$spec};
$done->{$spec} = 1;
solve_spec($spec, $noshared, $repo);
solve_spec($spec, $repo);
}
exit($error);

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: resolve-lib.1,v 1.4 2011/11/15 20:02:38 espie Exp $
.\" $OpenBSD: resolve-lib.1,v 1.5 2016/04/04 17:12:58 naddy Exp $
.\"
.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
.\"
@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: November 15 2011 $
.Dd $Mdocdate: April 4 2016 $
.Dt RESOLVE-LIB 1
.Os
.Sh NAME
@ -23,7 +23,6 @@
.Sh SYNOPSIS
.Nm resolve-lib
.Op Fl needed
.Op Fl noshared
.Op Fl silent
.Ar spec ...
.Sh DESCRIPTION
@ -57,10 +56,6 @@ Each
not found will result in an error message and exit code.
.Pp
If the option
.Fl noshared
is used, shared libraries will be ignored.
.Pp
If the option
.Fl silent
is used, nothing will be displayed.
.Pp