From owner-freebsd-ports@FreeBSD.ORG Sun Jul 29 00:44:43 2007 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D566216A41F for ; Sun, 29 Jul 2007 00:44:43 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 6F68C13C469 for ; Sun, 29 Jul 2007 00:44:43 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from laptop2.gateway.2wire.net (cauchy.math.missouri.edu [128.206.184.213]) by cauchy.math.missouri.edu (8.14.1/8.13.4) with ESMTP id l6T0igOY025510 for ; Sat, 28 Jul 2007 19:44:43 -0500 (CDT) (envelope-from stephen@math.missouri.edu) Message-ID: <46ABE2FA.8030607@math.missouri.edu> Date: Sat, 28 Jul 2007 19:44:42 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.5) Gecko/20070721 SeaMonkey/1.1.3 MIME-Version: 1.0 To: ports@freebsd.org Content-Type: multipart/mixed; boundary="------------050709070607040801020400" Cc: Subject: Speedup for pkg_version X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2007 00:44:43 -0000 This is a multi-part message in MIME format. --------------050709070607040801020400 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This is a kludge, but it makes pkg_version 4 times faster on my set up. The idea is that "make -V PKGNAME" should ordinarily be a very fast operation. So it runs a very cut down version of bsd.port.mk. If that bombs with an error, then it does the full bsd.port.mk. Maybe portsmanager and similar tools could use this idea. --------------050709070607040801020400 Content-Type: text/plain; name="ddd" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ddd" --- usr.sbin/pkg_install/version/perform.c-orig 2007-07-28 19:20:33.000000000 -0500 +++ usr.sbin/pkg_install/version/perform.c 2007-07-28 19:24:23.000000000 -0500 @@ -124,6 +124,30 @@ * we look for it's corresponding Makefile. If that fails we pull in * the INDEX, and check there. */ +char exec_string[] = +"makefile=`grep -v -E '\\.include.*\\/dev/null <