Re: buildenv.pl/buildenv.bat - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: buildenv.pl/buildenv.bat
Date
Msg-id 200712081229050000@2309628813
Whole thread Raw
In response to buildenv.pl/buildenv.bat  (Magnus Hagander <magnus@hagander.net>)
Responses Re: buildenv.pl/buildenv.bat  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
> >> 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[\@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.

Right.


> 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.

Probably, yeah. Maybe we're better off just documenting that you need both files in some cases, rather than putting in
somethingwe don't like.
 


> 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.

install should just use the perl version,no? That should be a simple enough fix to get into 8.3.

builddoc is, as you say, fairly important.

bison/flex is not really needed (well, the buildenv part) for commandline build, but they're required for builds from
insidethe gui.
 


/Magnus



pgsql-hackers by date:

Previous
From: "Guillaume Smet"
Date:
Subject: Re: Release Note Changes
Next
From: Josh Berkus
Date:
Subject: Re: pg_controldata doesn't report 64/32bit?