From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 23 12:40:08 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 936521065674 for ; Thu, 23 Feb 2012 12:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6199B8FC20 for ; Thu, 23 Feb 2012 12:40:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1NCe8ih095247 for ; Thu, 23 Feb 2012 12:40:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1NCe8rb095246; Thu, 23 Feb 2012 12:40:08 GMT (envelope-from gnats) Resent-Date: Thu, 23 Feb 2012 12:40:08 GMT Resent-Message-Id: <201202231240.q1NCe8rb095246@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Hiroto Kagotani Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ED3F106566C for ; Thu, 23 Feb 2012 12:32:32 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 899F28FC12 for ; Thu, 23 Feb 2012 12:32:32 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q1NCWWHv044805 for ; Thu, 23 Feb 2012 12:32:32 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q1NCWWqR044804; Thu, 23 Feb 2012 12:32:32 GMT (envelope-from nobody) Message-Id: <201202231232.q1NCWWqR044804@red.freebsd.org> Date: Thu, 23 Feb 2012 12:32:32 GMT From: Hiroto Kagotani To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/165419: Mk/bsd.port.mk: "make showconfig" to tell whether option values are same as the default X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2012 12:40:08 -0000 >Number: 165419 >Category: misc >Synopsis: Mk/bsd.port.mk: "make showconfig" to tell whether option values are same as the default >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 23 12:40:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Hiroto Kagotani >Release: FreeBSD 8.1-RELEASE >Organization: >Environment: FreeBSD myhost.mydomain 8.1-RELEASE-p5 FreeBSD 8.1-RELEASE-p5 #0: Tue Sep 27 16:18:26 UTC 2011 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: I sometimes want to identify installed packages whose option values are different from the default. Though "make showconfig" and "make config" show the current option values, they don't tell which are same as or different from the default. Instead, I need to compare values with the value of OPTION variable in Makefile. My idea is to make "make showconfig" tell whether option values are same as the default. The patch attached implements the idea. Using this, I can easily find packages with non-default option values like this: % make showconfig-recursive | grep -v 'same as default' >How-To-Repeat: >Fix: Patch attached with submission follows: --- /usr/ports/Mk/bsd.port.mk.orig 2012-02-02 17:36:41.000000000 +0900 +++ /usr/ports/Mk/bsd.port.mk 2012-02-23 21:21:43.000000000 +0900 @@ -6093,8 +6093,10 @@ withoutval=$$(eval ${ECHO_CMD} $$\{$${withoutvar}\}); \ if [ ! -z "$${withval}" ]; then \ val=on; \ + case "$${defaultval}" in on|ON|On) val="$${val} (same as default)";; esac; \ elif [ ! -z "$${withoutval}" ]; then \ val=off; \ + case "$${defaultval}" in off|OFF|Off) val="$${val} (same as default)";; esac; \ else \ val="$${defaultval} (default)"; \ fi; \ >Release-Note: >Audit-Trail: >Unformatted: