Re: buildenv.pl/buildenv.bat

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: buildenv.pl/buildenv.bat
Date: 2007-12-05 20:27:49
Message-ID: 475709C5.9050609@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander wrote:
> On Tue, Dec 04, 2007 at 09:31:30AM -0500, Andrew Dunstan wrote:
>
>> Magnus Hagander wrote:
>>
>>>> My recollection is that I changed the minimum amount necessary, because
>>>> I was expecting us to go into beta at anmy moment (silly me). That might
>>>> be why we still have both. There was an expectation that some cleanup
>>>> might be required during 8.4 development. I know I left other .bat files
>>>> as wrappers for the perl scripts, but that's obviously not appropriate
>>>> here. I'll see if I can adjust builddoc.bat so we can get rid of
>>>> buildenv.bat.
>>>>
>>>> As for documentation, you're probably right, I could easily have missed
>>>> it. I'll look into it.
>>>>
>>>>
>>> Great. Let me know if you need me to poke at anything.
>>>
>>>
>>>
>>>
>> OK, I'm thinking that the best way might be to do away with buildenv.bat
>> altogether and replace the remaining references to it in .bat files with
>> something like this fragment:
>>
>> if not exist src\tools\msvc\buildenv.pl goto nobuildenv
>> perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each
>> %ENV) { print qq[\(at)SET $k=$v\n]; }" > tmp.bat
>> call tmp.bat
>> del tmp.bat
>> :nobuildenv
>>
>> and adjust the docs accordingly.
>>
>> Thoughts?
>>
>
> Urgh.
>
> I thought you specifically changed the earlier scripts to *avoid* having
> them create a temporary file and then execute it. Which I agreed with :-)
>
> I think I'd prefer we just get rid of the .bat's completely then.
>
> I wonder if we are daring enough to do it so late in the cycle, though..
>
>
>

I did specifically do that, but I can't see a small workaround here that
doesn't use this mechanism, since there's no eval function in the
Windows shell.

I agree with getting rid of the remaining .bat files, or at least making
them one line wrappers for perl scripts, but I think it's too late in
the cycle for that now. As I explained, the reason I didn't make more
changes before was because I thought it was too late then. I did just
enough to make running the whole thing with the buildfarm client work
reliably.

I think we could reasonably get away with this for one cycle and clean
it up more thoroughly in 8.4. There are exactly four places that use
buildenv.bat: install.bat, builddoc.bat, pgbison,bat and pgflex.bat. Of
these, the only one that really matters, I suspect, is builddoc.bat, but
if we fix it we should do so consistently.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message depesz 2007-12-05 20:34:49 BUG #3799: csvlog skips some logs
Previous Message Chris Browne 2007-12-05 20:13:48 Re: Better default_statistics_target