Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2013 18:43:33 +0200
From:      Johan Kuuse <kuuse@redantigua.com>
To:        freebsd-questions@freebsd.org
Subject:   FreeBSD Make question
Message-ID:  <CAGUU1d2T5QMWF619KXgoMwtAG1iA4zcL3KFuCcg-tdOZBrXSGg@mail.gmail.com>

Next in thread | Raw E-Mail | Index | Archive | Help
Hi,

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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAGUU1d2T5QMWF619KXgoMwtAG1iA4zcL3KFuCcg-tdOZBrXSGg>