[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interpolating construction variables in compiler flags

From: Gary Oberbrunner
Subject: Re: Interpolating construction variables in compiler flags
Date: Tue, 11 Mar 2003 23:22:04 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210

Try something like this:
  $DATADIR = DirPath("#data")
This gives the build path of that dir.
You can get the source path of a file with SourcePath, but I'm not sure if that works with a dir name.

-- Gary

H. S. Teoh wrote:
Hi, I've run into this little rut with Cons: I'm trying to define a C
preprocessor macro with -D, whose value is a pathname defined in the
Construct file. The problem is, setting the path in the Construct file to
"#data" and adding "-DDATADIR=$DATADIR" to $CFLAGS doesn't work, because
it's not interpolated (cons tries to run g++ with "-DDATADIR=#data"
without expanding the path).

How do I make Cons interpolate the path before adding it to CFLAGS?
Or perhaps a better question is, what's the right way to accomplish what I

reply via email to

[Prev in Thread] Current Thread [Next in Thread]