[Top][All Lists]

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

Re: Questions: ./config.h.in & ./windows-NT/config.h.in

From: Derek Robert Price
Subject: Re: Questions: ./config.h.in & ./windows-NT/config.h.in
Date: Sat, 15 May 2004 17:58:29 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

Hash: SHA1

Conrad T. Pino wrote:

>Hi Derek,
>>From: Derek Robert Price
>>Actually, it shouldn't really matter.  I was thinking at first that,
>>aesthetically, it might be more pleasing to generate a file with the
>>version info and then use it in conjunction with the other source file
>>to generate config.h with the perl script, but, pratically and upon
>>further consideration, I think it probably makes more sense to leave
>>the config.h.in ->config.h step where it is since that step can run
>>without Perl and running the Perl script will need to be disabled
>>unless --enable-maintainer-mode.
>The drift between respective "config.h.in" is substantial.  A Perl
>script implementation looks feasible.  The challenge lies in an in
>depth analysis of element in "windows-NT/config.h.in" that don't
>occur in "./config.h.in" which may require a larger chunk of time
>than I have right now.  I plan to revisit this topic after finishing
>the missing function prototype list I took up in early April 2004.

Actually, if should be pretty straightforward, not in depth at all.
Mostly, config.h.in undefines things that might later be defined, for
reference and to get defines near their comments later.  The current
windows-NT/config.h.in could even be used to create the template.  The
algorithm, assuming the contents of the current windows-NT/config.h.in
were in windows-NT/config.h.in.in would be something like:

copy config.h.in to windows-NT/config.h.in
foreach #define in windows-NT/config.h.in.in
    find corresponding #undef in windows-NT/config.h.in
       (if not present, print warning)
    replace line with current #define
end foreach
foreach #undef in config.h.in
    find corresponding #define or #undef in windows-NT/config.h.in.in
       (if not present, print warning)
end foreach

The second loop, of course, could be sped up by caching the contents
of windows-NT/config.h.in.in during the first loop.


- --

Email: derek@ximbiot.com

Get CVS support at <http://ximbiot.com>!
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

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