From owner-freebsd-ports@FreeBSD.ORG Thu Jun 19 13:15:27 2008 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 74C901065677 for ; Thu, 19 Jun 2008 13:15:27 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id EE5328FC28 for ; Thu, 19 Jun 2008 13:15:26 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.183.219] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1K9HGU-0007j8-Rk; Thu, 19 Jun 2008 12:21:14 +0200 Message-ID: <485A3314.8010304@FreeBSD.org> Date: Thu, 19 Jun 2008 12:21:08 +0200 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.14 (X11/20080610) MIME-Version: 1.0 To: Kris Kennaway References: <484EAFAC.3020208@FreeBSD.org> In-Reply-To: <484EAFAC.3020208@FreeBSD.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: ports@FreeBSD.org Subject: Re: INDEX build optimizations - please review 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: Thu, 19 Jun 2008 13:15:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Kris Kennaway wrote: | ********************************************************************** | ********************* NOTE TO PORT DEVELOPERS ************************ | ********************************************************************** | | Variable assignments with != are bad! Try as hard as you can to avoid | using them -- especially in Mk/*! Every time something processes your | makefile it will spawn a command, even if it is not relevant for the | operation being performed. If you need to run shell commands, try to | isolate them within a makefile target. You can avoid code duplication | by assigning the *shell commands* (not their output) to a variable and | inserting it into your code block. | | e.g. instead of | | -- | VARIABLE!= do some shell stuff; do some other stuff | | target: | echo ${VARIABLE} | -- | | do this (or similar): | | -- | VARIABLE_CMDS= do some shell stuff; do some other stuff | | target: | echo $(${VARIABLE_CMDS}) | -- | | This defers the command execution to the point where the target runs, so | in the case when the target is *not* run, then you avoid wasting one or | more process executions. Yes, in theory. Any clue why this doesn't work? SCHED_NAME= sysctl -n kern.sched.name all: ~ echo $(${SCHED_NAME}) | | Kris | - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAkhaMxIACgkQwMJqmJVx945CEgCePoNe6vevue/Hfww4DpM0vJrM r/gAn0aAJ+Y68FqLSi7axSdOHuo5EiY4 =6LX2 -----END PGP SIGNATURE-----