chicken-users
[Top][All Lists]
Advanced

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

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


From: Brandon J. Van Every
Subject: Re: [Chicken-users] -D arguments vs. chicken-defaults.h
Date: Wed, 19 Jul 2006 00:54:52 -0700
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

felix winkelmann wrote:
On 7/19/06, Brandon J. Van Every <address@hidden> wrote:
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.

NO NO NO. The quotes are needed for the C compiler to recognize a literal
string.

I wasn't sure because I don't know how you actually use C_INSTALL_HOME and company when generating C code. And because trial-and-error never resulted in provably correct builds. I will change the convention to unescaped quotes.


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.

Yes, that makes sense.

In time, the chicken-paths.h.in and stack-size.h.in files can be used by the ./configure build. They use simple variable substitutions like @DEFAULT_TARGET_STACK_SIZE@



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


No. Please consult your favorite C textbook.

How about I consult my favorite Chicken build? If it were as easy as RTFM I would have had this solved a month ago.


Cheers,
Brandon Van Every





reply via email to

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