From aca2338790665caf3f78618178ddb3f6e82371de Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Thu, 14 Dec 2006 22:45:22 +0000 Subject: do not display result if $rc != 0, fixes cases like LIBS=`pkg-config --libs foo`, like in net/ekg --- usr.bin/pkg-config/pkg-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/pkg-config/pkg-config b/usr.bin/pkg-config/pkg-config index 8d0ff6f9606..2e9885f2d79 100644 --- a/usr.bin/pkg-config/pkg-config +++ b/usr.bin/pkg-config/pkg-config @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: pkg-config,v 1.16 2006/12/14 10:23:34 espie Exp $ +# $OpenBSD: pkg-config,v 1.17 2006/12/14 22:45:21 espie Exp $ #$CSK: pkgconfig.pl,v 1.39 2006/11/27 16:26:20 ckuethe Exp $ # Copyright (c) 2006 Chris Kuethe @@ -196,7 +196,7 @@ my $dep_cfg_list = simplify_and_reverse($cfg_full_list); if ($mode{cflags} || $mode{libs} || $mode{variable}) { push @vlist, do_cflags($dep_cfg_list) if $mode{cflags}; push @vlist, do_libs($dep_cfg_list) if $mode{libs}; - print join(' ', @vlist), "\n"; + print join(' ', @vlist), "\n" if $rc == 0; } exit $rc; -- cgit v1.2.3