Re: Interpolating construction variables in compiler flags
Gary Oberbrunner <[email protected]> Tue, 11 Mar 2003 23:22:04 -0500
| Newsgroups | gmane.comp.gnu.cons.general |
|---|---|
| Message-ID | <[email protected]> |
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
> want?
_______________________________________________
[email protected]
http://mail.gnu.org/mailman/listinfo/cons-discuss
Cons URL: http://www.dsmit.com/cons/