From owner-freebsd-current@FreeBSD.ORG Thu Jul 31 14:50:00 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5EA437B401 for ; Thu, 31 Jul 2003 14:50:00 -0700 (PDT) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBF7943FDD for ; Thu, 31 Jul 2003 14:49:59 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.12.9/8.12.9) with ESMTP id h6VLnuRD010238; Thu, 31 Jul 2003 17:49:58 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: <20030730212049.GI33188@sunbay.com> <20030730162320.A66578@FreeBSD.org> <20030730212744.GJ33188@sunbay.com> <20030730163705.A68092@FreeBSD.org> Date: Thu, 31 Jul 2003 17:49:55 -0400 To: naddy@mips.inka.de (Christian Weisgerber), freebsd-current@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: make -U X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2003 21:50:01 -0000 At 1:39 PM +0000 7/31/03, Christian Weisgerber wrote: >Juli Mallett wrote: > > > Why go thru those contortions? I sometimes use "make FOO=" to > > define things. -U obviously has a place, if it not existing > > means I have to have all these contortions to do a fairly > > obvious thing, yeah? > >What are the exact semantics of -U supposed to be? From the message in freebsd-hackers which first introduced this patch: - Date: Tue, 29 Jul 2003 09:09:17 -0700 - From: Faried Nawaz - Subject: patch to add make -U While working around a port issue (ports/55013), I discovered that make couldn't unset variables using make -U. I've written a small patch that adds -U functionality, but I haven't tested it extensively. http://web.nilpotent.org/tmp/make.diff.bz2 (~ 3KB unpacked) against yesterday's -CURRENT code. A simple Makefile I used to test it: -- cut here -- FOO = bar .ifdef FOO SAY = y .else SAY = n .endif all: echo $(SAY) -- cut here -- Try "make -U FOO". Personally I think this is a reasonable option to implement. An undefined variable is not the same as a variable which is defined to be a null string. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu