From owner-freebsd-questions@FreeBSD.ORG Thu Oct 17 19:41:41 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 DE337A3B for ; Thu, 17 Oct 2013 19:41:41 +0000 (UTC) (envelope-from pascal@lechindianer.de) Received: from scummserver.lechindianer.de (scummserver.lechindianer.de [83.169.44.49]) by mx1.freebsd.org (Postfix) with ESMTP id A14402CE0 for ; Thu, 17 Oct 2013 19:41:41 +0000 (UTC) Received: from [192.168.178.46] (dslb-084-057-037-251.pools.arcor-ip.net [84.57.37.251]) by scummserver.lechindianer.de (Postfix) with ESMTPSA id 526BB1DB802E; Thu, 17 Oct 2013 21:32:15 +0200 (CEST) Message-ID: <52603AD4.7040405@lechindianer.de> Date: Thu, 17 Oct 2013 21:30:28 +0200 From: Pascal Schmid User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: FreeBSD Make question References: <21.DC.19454.E1830625@cdptpa-oedge03> In-Reply-To: <21.DC.19454.E1830625@cdptpa-oedge03> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kuuse@redantigua.com 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:41:41 -0000 On 10/17/2013 09:18 PM, Thomas Mueller wrote: >> 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 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > Have you tried different quotes? "'" does not have the same effect as "`" (backtick).