From owner-freebsd-ports Mon Sep 14 14:20:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA24242 for freebsd-ports-outgoing; Mon, 14 Sep 1998 14:20:04 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from catastrophe.gelemna.ft-wayne.in.us (fw-line-29.fwi.com [209.84.172.34]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA24087 for ; Mon, 14 Sep 1998 14:19:44 -0700 (PDT) (envelope-from croyle@gelemna.ft-wayne.in.us) Received: from emerson.gelemna.ft-wayne.in.us (emerson.gelemna.ft-wayne.in.us [10.23.42.2]) by catastrophe.gelemna.ft-wayne.in.us (8.8.8/8.8.8) with ESMTP id QAA11976 for ; Mon, 14 Sep 1998 16:19:23 -0500 (EST) (envelope-from croyle@gelemna.ft-wayne.in.us) Received: (from croyle@localhost) by emerson.gelemna.ft-wayne.in.us (8.9.1/8.9.1) id QAA09932; Mon, 14 Sep 1998 16:19:22 -0500 (EST) (envelope-from croyle@gelemna.ft-wayne.in.us) To: ports@FreeBSD.ORG Subject: Re: ELF style (where to test PORTOBJFORMAT) References: <19980914085939.A9766@znh.org> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: Don Croyle Date: 14 Sep 1998 16:19:21 -0500 Organization: Minimal at best In-Reply-To: Zach Heilig's message of "Mon, 14 Sep 1998 08:59:39 -0500" Message-ID: <86g1dul7dy.fsf@emerson.gelemna.ft-wayne.in.us> Lines: 26 X-Mailer: Gnus v5.6.36/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Zach Heilig writes: > Typically, in a port makefile, the very last line is > > .include > > Obviously, since sets PORTOBJFORMAT, you cannot test that > variable before the .include, so is it good style to have lines after the > .include? Or, is PORTOBJFORMAT not for consumption in the top level makefile. Within a target, some testing indcates that a shell construct like: test: if [ "${PORTOBJFORMAT}" = "elf" ]; then\ ${ECHO} "elf";\ else\ ${ECHO} "aout";\ fi is safe and will yield the expected results. I don't see any way to use PORTOBJFORMAT in an .if construct other than by putting it below the .include. -- I've always wanted to be a dilettante, but I've never quite been ready to make the commitment. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message