From owner-freebsd-doc@FreeBSD.ORG Mon Oct 28 17:06:42 2013 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B021033C for ; Mon, 28 Oct 2013 17:06:42 +0000 (UTC) (envelope-from kuuse.redantigua@gmail.com) Received: from mail-ve0-x22a.google.com (mail-ve0-x22a.google.com [IPv6:2607:f8b0:400c:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F1322E1D for ; Mon, 28 Oct 2013 17:06:42 +0000 (UTC) Received: by mail-ve0-f170.google.com with SMTP id oy12so3121501veb.29 for ; Mon, 28 Oct 2013 10:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=7qPCefLHY6SCTWzBvWUP6xfWb29vCSLUMcfjIp8P1xE=; b=L2bVfvamD7uIly8hMC6j6IjZY0mWoZUGYLHnwlnH4qLtkJkzK/4AZYZLF+4v5+KKP8 XOOAz6Q8rmFvdflVXXNBKBGFhTIOSLaxbU1CNjjj/KxVLug8u0GxxJFsdhYKHS9/bicM x7/LovYlKxummMRSrCdJC7bE/jEZ+qDkZp1lDppqx5j/XuUqaIjD81vgst/DOSxp4BrT 8evm/m+OnW3zOHSXMg61gnz9MPHLyItIizIBA5hihM46cL2Z2Rhwug848/YLS/aa8VAP eEgV6zEmF5qIN0DpkQ6wrvGbMHucOJ1H2yI1ouImBtEQ4eEw/2utgxb63NxvXwsD5NWd xh8A== MIME-Version: 1.0 X-Received: by 10.220.16.73 with SMTP id n9mr2380925vca.24.1382979991393; Mon, 28 Oct 2013 10:06:31 -0700 (PDT) Sender: kuuse.redantigua@gmail.com Received: by 10.58.2.106 with HTTP; Mon, 28 Oct 2013 10:06:31 -0700 (PDT) In-Reply-To: <20131025231000.C74665807E@chaos.jnpr.net> References: <20131024214923.CB0AF5807E@chaos.jnpr.net> <20131025174720.870B35807E@chaos.jnpr.net> <20131025231000.C74665807E@chaos.jnpr.net> Date: Mon, 28 Oct 2013 18:06:31 +0100 X-Google-Sender-Auth: XYcYyXe2pvbpHXXDFnXBFvimmmw Message-ID: Subject: Re: FreeBSD Make question From: Johan Kuuse To: "Simon J. Gerraty" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-doc@freebsd.org X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2013 17:06:42 -0000 > --------------------8<-------------------- > TLIST = "/tmp/dir with space/one" "/tmp/another spacey thing/two" > > tlist= > .for t in ${TLIST} > tlist+= ${t:tW:S, ,?,g:S,",,g} > # the above :tW causes the value to be treated as one-word The ':tW' variable modifier seems to be pmake/fmake syntax. At least it doesn't work using my Make (9201120530, FreeBSD 9.1 RELEASE) Is there any similar, non-documented, "treat-as-one-word"-modifier avilable for FreeBSD Make? ... > note we don't get 'making...' > If we replace ? with . it works but that isn't very useful: > > all: ${tlist:S,?,.,g} > @echo TLIST='${TLIST}' > @echo tlist='${tlist}' > > ${tlist:S,?,.,g}: .PHONY > @echo "making: '$@'" > > $ make > making: '/tmp/dir.with.space/one' > making: '/tmp/another.spacey.thing/two' > TLIST="/tmp/dir with space/one" "/tmp/another spacey thing/two" > tlist= /tmp/dir?with?space/one /tmp/another?spacey?thing/two > $ > Yes, finally we end up with a .PHONY target, which isn't useful in a real-case Makefile. Any targets containing whitespaces will always be rebuilt even if they're up to date. I guess my final solution will be : "Warning: You are using FreeBSD Make, and one or more of your directories/files contains whitespaces. Either rename your targets (recommended), or stick to GNU Make." Thanks for the input, regards, Johan