From owner-freebsd-ports-bugs@FreeBSD.ORG Sun May 13 22:00:14 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A351B106566C for ; Sun, 13 May 2012 22:00:14 +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 700EF8FC14 for ; Sun, 13 May 2012 22:00:14 +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 q4DM0Ero099744 for ; Sun, 13 May 2012 22:00:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4DM0Ed8099742; Sun, 13 May 2012 22:00:14 GMT (envelope-from gnats) Resent-Date: Sun, 13 May 2012 22:00:14 GMT Resent-Message-Id: <201205132200.q4DM0Ed8099742@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bryan Drewery Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA57C106566B for ; Sun, 13 May 2012 21:55:04 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id 72BAD8FC0C for ; Sun, 13 May 2012 21:55:04 +0000 (UTC) Received: (qmail 50102 invoked from network); 13 May 2012 16:55:02 -0500 Received: from unknown (HELO test8.xzibition.com) (10.10.0.34) by sweb.xzibition.com with SMTP; 13 May 2012 16:55:02 -0500 Received: by test8.xzibition.com (sSMTP sendmail emulation); Sun, 13 May 2012 16:54:42 -0500 Message-Id: <20120513215504.CA57C106566B@hub.freebsd.org> Date: Sun, 13 May 2012 16:54:42 -0500 From: "Bryan Drewery" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/167850: [PATCH] Mk: Add a Makefile for quick 'make -V' lookups X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bryan Drewery List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2012 22:00:14 -0000 >Number: 167850 >Category: ports >Synopsis: [PATCH] Mk: Add a Makefile for quick 'make -V' lookups >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun May 13 22:00:14 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Bryan Drewery >Release: FreeBSD 8.3-RELEASE i386 >Organization: >Environment: >Description: This patch simply adds a no-op Makefile to /usr/ports/Mk. It's intended to allow scripts to lookup global make.conf variables, including bsd.port.mk vars, in a quick way without depending on a port. For example, if a script wanted see if WITH_PKGNG was defined, it typically would do: WITH_PKGNG=`make -C /usr/ports -VWITH_PKGNG` This works, but is slow due to all of the subdir code, and takes 6 seconds on my machine. The patch makes this 0.19 seconds to process. Additionally, /usr/ports/Makefile doesn't pull in all of the bsd.port.mk variables, so it is more challenging to lookup variables such as MAKE_JOBS_NUMBER without using a port. `FORCE_MAKE_JOBS=yes make -C /usr/ports -VMAKE_JOBS_NUMBER` does not work `FORCE_MAKE_JOBS=yes make -C /usr/ports/$someport -VMAKE_JOBS_NUMBER` does work, but adds an unnecessary port dependency. The Makefile defines 1 target which tells the user there is nothing to do. The patch would benefit scripts such as ports-mgmt/portupgrade, ports-mgmt/portmaster ports-mgmt/poudriere as they check for various variables in /usr/ports using this method. >How-To-Repeat: >Fix: Patch is relative to Mk dir. --- patch-Mk-Makefile.txt begins here --- --- /dev/null 2012-05-13 16:23:20.000000000 -0500 +++ Makefile 2012-05-13 16:22:58.513083080 -0500 @@ -0,0 +1,8 @@ +# $FreeBSD$ +# This file is just meant to give a quick way to get +# make variables for shell scripts. +# CC=`make -C /usr/ports/Mk -VCC` +all: + @echo "Nothing to build here." + +.include --- patch-Mk-Makefile.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted: