From owner-freebsd-doc@FreeBSD.ORG Mon Aug 9 23:20:04 2010 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7339F1065678 for ; Mon, 9 Aug 2010 23:20:04 +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 3AAA88FC15 for ; Mon, 9 Aug 2010 23:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o79NK41b070680 for ; Mon, 9 Aug 2010 23:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o79NK4Sw070679; Mon, 9 Aug 2010 23:20:04 GMT (envelope-from gnats) Resent-Date: Mon, 9 Aug 2010 23:20:04 GMT Resent-Message-Id: <201008092320.o79NK4Sw070679@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sahil Tandon Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48740106566B; Mon, 9 Aug 2010 23:17:28 +0000 (UTC) (envelope-from sahil@spartan.hamla.org) Received: from spartan.hamla.org (spartan.hamla.org [206.251.255.30]) by mx1.freebsd.org (Postfix) with ESMTP id 2A59E8FC15; Mon, 9 Aug 2010 23:17:27 +0000 (UTC) Received: by spartan.hamla.org (Postfix, from userid 1001) id BC8FA17153; Mon, 9 Aug 2010 19:17:27 -0400 (EDT) Message-Id: <20100809231727.BC8FA17153@spartan.hamla.org> Date: Mon, 9 Aug 2010 19:17:27 -0400 (EDT) From: Sahil Tandon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: danfe@FreeBSD.org, doc@FreeBSD.org Subject: docs/149480: [PATCH] grammar/english suggestions for RUN_DEPENDS section of Porter's Handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sahil Tandon List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2010 23:20:04 -0000 >Number: 149480 >Category: docs >Synopsis: [PATCH] grammar/english suggestions for RUN_DEPENDS section of Porter's Handbook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Aug 09 23:20:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Sahil Tandon >Release: FreeBSD 9.0-CURRENT i386 >Organization: >Environment: >Description: In the patch below, I suggest some grammar/english adjustments to the section on RUN_DEPENDS. I have copied danfe@ on this report because he introduced this (very important!) information into the Porter's Handbook, and I do not want to step on any toes or imply that my english is superior. I simply want to increase clarity, and hope that you will review my patch + merge the parts that you consider useful. >How-To-Repeat: >Fix: --- porters-handbook.diff begins here --- ? porters-handbook.diff Index: en_US.ISO8859-1/books/porters-handbook/book.sgml =================================================================== RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v retrieving revision 1.1070 diff -u -r1.1070 book.sgml --- en_US.ISO8859-1/books/porters-handbook/book.sgml 8 Aug 2010 13:54:36 -0000 1.1070 +++ en_US.ISO8859-1/books/porters-handbook/book.sgml 9 Aug 2010 23:07:34 -0000 @@ -3283,33 +3283,28 @@ part can be omitted if it is the same as DEPENDS_TARGET. - Quite common situation is when + A quite common situation is when RUN_DEPENDS is literally the same as BUILD_DEPENDS, especially if ported software is written in a scripted language or if it requires - the same run-time environment used to build it. In this - case, it is very tempting, and indeed natural to directly - assign one to another: + the same build and run-time environment. In this + case, it is both tempting and intuitive to directly + assign one to the other: RUN_DEPENDS= ${BUILD_DEPENDS} - However, doing so can and often will result in - run-time dependencies be polluted by superfluous entries, not - present in original port's BUILD_DEPENDS. - It happens due to the fact that &man.make.1 is being lazy - when it evaluates assignments like these. Most probably - additional dependencies will be pulled by - ports/Mk/bsd.*.mk when processing - USE_* - variables, which most ports contain. For example, such - direct assignment along with - USE_GMAKE=yes will bring - gmake into - RUN_DEPENDS, despite that it was not - included explicitly in BUILD_DEPENDS. To - prevent this from happening, immediate expansion assignment - should be used, i.e. expand the value before assigning it - to the variable: + However, such assignment can pollute run-time dependencies + with entries not defined in the port's original BUILD_DEPENDS. + This happens because of &man.make.1;'s lazy evaluation of variable + assignment. Consider a Makefile with + USE_* variables, which + are processed by ports/Mk/bsd.*.mk to augment + initial build dependencies. For example, USE_GMAKE=yes + adds devel/gmake to + BUILD_DEPENDS. To prevent such additional dependencies + from polluting RUN_DEPENDS, take care to assign + with expansion, i.e. expand the value before assigning it to the + variable: RUN_DEPENDS:= ${BUILD_DEPENDS} --- porters-handbook.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: