develooper Front page | perl.perl5.porters | Postings from August 2011

Re: generating win32/config_H.*

Thread Previous | Thread Next
From:
Steve Hay
Date:
August 30, 2011 13:28
Subject:
Re: generating win32/config_H.*
Message ID:
CADED=K6FxJW-9uuskjsyaciECy71LsVVDgvSKxPu0rbHtdrRkQ@mail.gmail.com
On 30 August 2011 09:32, Nicholas Clark <nick@ccl4.org> wrote:
> The revision log for the files various Win32 "canned config files"
> win32/config_H.* suggest that they are updated manually and sporadically.
>

Yes, I've updated them numerous times, but regettably haven't done so
for a while. If you're looking at this area now, would it help or
hinder you if I brought them up to date now?


> As best I can tell each is generated from a corresponding config file
> using win32/config_h.PL, and I assume ideally is supposed to be in sync.
>

Essentially, yes. I do it using the regen_config_h target in
win32/Makefile, plus some (too much...) hand-editing. There are some
comments above that target which explain the process a little.


> win32/config_h.PL is actually portable. Would it make sense to do the
> regeneration as part of regen.pl, and (therefore) keep all the canned
> headers up to date automatically?
>

It would be nice, and I've thought about it before, but never worked
out a nice way to do it, given the amount of manual intervention
involved every time I've done it.

It involves building a perl with the various Makefile options all
switched off (see d64224560b and 17bdc11416 for the reasoning) and
then using that to run the regen_config_h target. (It would be
simplest if miniperl.exe was used to run that target, since
miniperl.exe is built with the various options switched off already,
but I think it didn't work when I last tried it -- miniperl.exe can't
load dynamic (DLL) extensions, and some were needed to run that target
IIRC.) Then some hand-editing is required to put back the special
__GNUC__ stuff which gets lost in that process (this is to allow
building XS extensions with GCC in a perl (e.g. ActivePerl...) that
was built with VC++), plus some stuff about QUAD_IS___INT64 got lost
the last time I did it and also needed restoring (I think Merijn was
going to update his magical Configure stuff to render that unnecessary
in future).

That's just for the VC++ 32-bit config. The VC++ 64-bit, GCC (32-bit)
and BCC configs also need doing similarly (with _MSC_VER stuff needing
to be restored in the GCC config after regeneration), plus a GCC
64-bit config has arrived since I last did this.

Some corners can be cut with the 64-bits being similar to the 32-bits
(just copy the new 32-bit config and apply the same diffs as existed
previously, provided that nothing new actually needs to differ between
32-bit and 64-bit...), but it's still rather laborious and I would
love to get it automated somehow.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About