From owner-svn-src-stable-9@freebsd.org Tue Sep 29 21:52:33 2015 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6177A0BFB7; Tue, 29 Sep 2015 21:52:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C2D91627; Tue, 29 Sep 2015 21:52:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8TLqXjk001042; Tue, 29 Sep 2015 21:52:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8TLqXpH001041; Tue, 29 Sep 2015 21:52:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201509292152.t8TLqXpH001041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 29 Sep 2015 21:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288399 - stable/9/tools/build/options X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2015 21:52:33 -0000 Author: bdrewery Date: Tue Sep 29 21:52:32 2015 New Revision: 288399 URL: https://svnweb.freebsd.org/changeset/base/288399 Log: MFC r287935: Optimize makeman slightly by removing uneeded cat and extra test -s. Modified: stable/9/tools/build/options/makeman Directory Properties: stable/9/tools/build/options/ (props changed) Modified: stable/9/tools/build/options/makeman ============================================================================== --- stable/9/tools/build/options/makeman Tue Sep 29 21:48:51 2015 (r288398) +++ stable/9/tools/build/options/makeman Tue Sep 29 21:52:32 2015 (r288399) @@ -59,7 +59,7 @@ show_options() fi done - cat $t/settings | while read opt targets ; do + while read opt targets ; do if [ "${targets}" = "${ALL_TARGETS}" ] ; then echo "WITHOUT_${opt}" elif [ -z "${targets}" ] ; then @@ -68,7 +68,7 @@ show_options() echo "WITHOUT_${opt}" $(no_targets "${ALL_TARGETS}" "${targets}") echo "WITH_${opt} ${targets}" fi - done + done < $t/settings } # @@ -250,31 +250,33 @@ EOF :> $t/deps2 fi + havedeps=0 if [ -s $t/deps ] ; then + havedeps=1 echo 'When set, it also enforces the following options:' echo '.Pp' echo '.Bl -item -compact' - cat $t/deps | while read opt2 ; do + while read opt2 ; do echo '.It' echo ".Va ${opt2}" - done + done < $t/deps echo '.El' fi if [ -s $t/deps2 ] ; then - if [ -s $t/deps ] ; then + if [ ${havedeps} -eq 1 ] ; then echo '.Pp' fi echo 'When set, the following options are also in effect:' echo '.Pp' echo '.Bl -inset -compact' - cat $t/deps2 | while read opt2 ; do + while read opt2 ; do echo ".It Va ${opt2}" noopt=$(echo ${opt2} | sed -e's/WITH_/WITHOUT_/;t' -e's/WITHOUT_/WITH_/') echo '(unless' echo ".Va ${noopt}" echo 'is set explicitly)' - done + done < $t/deps2 echo '.El' fi twiddle >&2