From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 2 01:45:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFB7106566B for ; Tue, 2 Mar 2010 01:45:38 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E41898FC15 for ; Tue, 2 Mar 2010 01:45:37 +0000 (UTC) Received: by pwj1 with SMTP id 1so573956pwj.13 for ; Mon, 01 Mar 2010 17:45:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=qE4cZsYXQz4ecQLZ+gO5eJ9XcVqJXg00gK7k+MGLAAY=; b=LqQqGgHg+dLcVs2QpizMV4Wkj6ftgXYJhs627VeUszpVJfv3PJDG3YL1bolBHA1QoI dWSpPIptkdp2ifTT26r6yukFZpMIWO5p/TvcC8uyIw/2iiIvYL+jUIn8TQ6aBnjL+VVa bU5J2LnKiZM0hknhYfAt0uoJfR9rXe0GMRAfQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Jp3sJpjLx8shxh9z8Eu++D+NJjsm3oXyPyS14CzYIQJSysQNVqq8zGZAJ8UOge3UW1 d+phDtAiw97Hx17ftNLIOlhmlLZYNyKFrgeObsANgDExrFwoVAZnIXCB7LEhfxjyBuEN qj1JzTmPAZIOPaoOPWDfM+rlblxBjzP5eHHv8= MIME-Version: 1.0 Received: by 10.143.26.12 with SMTP id d12mr2334449wfj.136.1267494333313; Mon, 01 Mar 2010 17:45:33 -0800 (PST) In-Reply-To: References: Date: Mon, 1 Mar 2010 17:45:33 -0800 Message-ID: <7d6fde3d1003011745w6156c6c2o444eae09d775e556@mail.gmail.com> From: Garrett Cooper To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: jhell , FreeBSD Hackers Subject: Re: `make cleanworld` and /usr/obj/lib32/usr/src X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 01:45:38 -0000 On Mon, Mar 1, 2010 at 5:19 PM, Alexander Best wrote: > jhell schrieb am 2010-03-02: > >> On Mon, 1 Mar 2010 19:45, alexbestms@ wrote: >> >jhell schrieb am 2010-03-02: > >> >>On Mon, 1 Mar 2010 14:52, alexbestms@ wrote: > >> >>>oh. and btw: wouldn't it be reasonable to prevent a user shooting >> >>>himself in >> >>>the foot if he has the brilliant idea of setting "MAKEOBJDIRPREFIX >> >>>= /" ? > >> >>>alex > > >> >>Trying to match something like this is going to get out of control. >> >>Though this is a nice idea but why should a user be prevented from >> >>doing such things ?. > >> >>Boiling down these are not variables that usually have to be >> >>changed >> >>and if they are changed the user has done a little bit of research >> >>and is more advanced than most and recognizes that / is not a >> >>option. > >> >hmmm...so you think something like this won't be useful? > >> >alex > >> >>-- > >> >>jhell > > >> What about the case where MAKEOBJDIRPREFIX="/ usr/obj/dir". I >> suppose make will fail in this case but I don't have anything to >> test this situation in ATM. > > nope. just tested it. only a real MAKEOBJDIRPREFIX="/" triggers the error. > >> But aside from that "typical user" never adjusts such things and it >> adds just a slight bit more overhead to the build that can be >> avoided altoghter by the user reading what they type. > > you're probably right. regular users will most definitely never come across > MAKEOBJDIRPREFIX and if some advanced user decides to set it to "/" that's up > to him. What about these? /./ /. //// // I avoided these errors by writing `abspath' for LTP (it was required for GNU make backwards compatibility). jhell is right though ... if you're going to go down this road it's going to be a maintenance mess unless you have something that will abspath the file (and I used 24 or so confusing lines in awk to do it): http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=blob;f=scripts/lib/file_functions.sh;h=fd56492569e9bcfe19dd5d35db922cd94df77fb6;hb=HEAD Thanks, -Garrett