chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] -D arguments vs. chicken-defaults.h


From: Brandon J. Van Every
Subject: [Chicken-users] -D arguments vs. chicken-defaults.h
Date: Tue, 18 Jul 2006 21:10:08 -0700
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

I believe the ./configure build is driven entirely by -D arguments for INSTALL_HOME etc. chicken-defaults.h is generated late in the build, is used by very few files, and I believe is always overridden by -D arguments anyways. This leads me to believe that the form of pathnames in chicken-defaults.h is not to be trusted. This form, incidentally, is:

#ifndef C_INSTALL_HOME
# define C_INSTALL_HOME "/cygdrive/c/Program Files/cygchicken/share/chicken"
#endif

I think, possibly, the quotes should be escaped.  But I am not sure.

I do not believe there should be 2 ways of passing around pathnames. One size should fit all, to prevent this kind of devious second guessing. In the CMake build, I've broken chicken-defaults.h into chicken-paths.h and stack-size.h. This is because they're determined at different stages of the build. pathnames are easy to determine at configuration time and do not change. The stack size may depend on the result of nursery sampling, and if so can only be determined at build time, after a lot of other stuff has been built.

In the ./configure build, -D flags are passed in different ways. libtool receives single quotes around a double quoted string:
-DC_INSTALL_HOME='"/e/Program Files/msyschicken/share/chicken"'

gcc receives the entire -D flag double quoted, and the double quotes for the pathname itself are escaped:
"-DC_INSTALL_HOME=\"/e/Program Files/msyschicken/share/chicken\""

This lends credence to the "quotes should be escaped" theory.


Cheers,
Brandon Van Every






reply via email to

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