From owner-freebsd-questions@FreeBSD.ORG Thu Oct 17 19:19:01 2013 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 15D44E04 for ; Thu, 17 Oct 2013 19:19:01 +0000 (UTC) (envelope-from mueller6721@twc.com) Received: from cdptpa-oedge-vip.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.226]) by mx1.freebsd.org (Postfix) with ESMTP id D6F312B44 for ; Thu, 17 Oct 2013 19:19:00 +0000 (UTC) Received: from [74.130.200.176] ([74.130.200.176:52640] helo=localhost) by cdptpa-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 21/DC-19454-E1830625; Thu, 17 Oct 2013 19:18:54 +0000 Date: Thu, 17 Oct 2013 19:18:54 +0000 Message-ID: <21.DC.19454.E1830625@cdptpa-oedge03> From: "Thomas Mueller" To: freebsd-questions@FreeBSD.org Subject: Re: FreeBSD Make question X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 0 Cc: Johan Kuuse X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 19:19:01 -0000 > I'm trying to write a Makefile for FreeBSD Make (not GNU Make), with target > names containg spaces. > Example: > MY_TARGET=/home/joe/directory name with spaces/hello.c > ${MY_TARGET}: @echo ${.TARGET} > The output is truncated to '/home/joe/directory' > Is there any possible way to escape this properly? > I have read all the documentation I could find, and tried several ways > solving this problem, using quotes, escapes, substitutions. > The output is the same if as use sh, bash, or tcsh, so it isn't shell > related. > Are spaces simply not possible to use in target names? > If I'm on the wrong list, or someone could point me into any direction to > solve this, I would gladly appreciate any hints. > Best Regards, > Johan I believe that in (quasi-)Unix in general, including FreeBSD and Linux, you use backslash to escape an embedded space in directory or file names. Backslash causes the following character to be interpreted as an ordinary character with no special meaning. Try MY_TARGET=/home/joe/directory\ name\ with\ spaces/hello.c Tom