Date: Thu, 17 Sep 2015 20:45:52 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287935 - head/tools/build/options Message-ID: <201509172045.t8HKjq3H092123@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Thu Sep 17 20:45:51 2015 New Revision: 287935 URL: https://svnweb.freebsd.org/changeset/base/287935 Log: Optimize makeman slightly by removing uneeded cat and extra test -s. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/options/makeman Modified: head/tools/build/options/makeman ============================================================================== --- head/tools/build/options/makeman Thu Sep 17 20:36:46 2015 (r287934) +++ head/tools/build/options/makeman Thu Sep 17 20:45:51 2015 (r287935) @@ -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 } # @@ -263,31 +263,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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509172045.t8HKjq3H092123>