Thread: Change to config.pl processing in the msvc build environment
I'd like to apply the attached patch to the msvc build environment, which changes how config.pl is handled. (For the unenlightened, this is the replacement stuff we have for autoconf) Today, there is one config.pl. We ship it with a couple of defaults (which points to a very old installation of mine, really, and probably shouldn't have included those paths in the first place), and you are supposed to edit this config.pl file in-place to change which 3rd party libs etc you have. This is pretty convenient for end-users building from source. Of which we don't have many. And it's annoying for doing any development work on it, because it shows up in your "git diff" or whatever, and you can't ignore the file or you won't get new updates out. I therefor propose that we rename this file to "config.pl.default", and change the scripts to first load config.pl.default, and then load config.pl if it exists. config.pl then lives completely outside the source tree (should be in .cvsignore) and won't show up in any diffs or anything. It changes the format of the config.pl file (not the default one), so that the user can now specify just one or two options, and doesn't hav eto respecify all. So now you can have just: $config->{zlib}='c:\zlib'; (or similar). *If* you put in th place the old config.pl file, it will override whatever is in the default file. Thus, I don't believe this would have any effect on the buildfarm or the oneclick-installer build environments. Comments? Objectsions? Holes in the reasoning? :-) (patch excludes the rename of config.pl to config.pl.default, for readability) -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Attachment
Magnus Hagander wrote: > I therefor propose that we rename this file to "config.pl.default", > and change the scripts to first load config.pl.default, and then load > config.pl if it exists. config.pl then lives completely outside the > source tree (should be in .cvsignore) and won't show up in any diffs > or anything. I've used similar tricks elsewhere and find them pretty useful. The patch looks reasonably sane to someone 101% unfamiliar with our MSVC stuff (except that I'd get rid of the parentheses in the "do foo unless -f $file" lines). -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
On Sat, Jan 2, 2010 at 02:20, Alvaro Herrera <alvherre@commandprompt.com> wrote: > Magnus Hagander wrote: > >> I therefor propose that we rename this file to "config.pl.default", >> and change the scripts to first load config.pl.default, and then load >> config.pl if it exists. config.pl then lives completely outside the >> source tree (should be in .cvsignore) and won't show up in any diffs >> or anything. > > I've used similar tricks elsewhere and find them pretty useful. The > patch looks reasonably sane to someone 101% unfamiliar with our MSVC > stuff (except that I'd get rid of the parentheses in the "do foo unless > -f $file" lines). You now, that's what I had first. Then I changed it to add the parentheses to make it look like a similar piece of code nearby, written by somebody much more perly than I am. But now that I think of it, it may well be me who wrote that code earlier as well, so that'd no good excuse :-) -- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/
On fre, 2010-01-01 at 16:32 +0100, Magnus Hagander wrote: > I therefor propose that we rename this file to "config.pl.default", > and change the scripts to first load config.pl.default, and then load > config.pl if it exists. I'd keep the naming so that the extension .pl is preserved. Helps editors and such.
Peter Eisentraut wrote: > On fre, 2010-01-01 at 16:32 +0100, Magnus Hagander wrote: > >> I therefor propose that we rename this file to "config.pl.default", >> and change the scripts to first load config.pl.default, and then load >> config.pl if it exists. >> > > I'd keep the naming so that the extension .pl is preserved. Helps > editors and such. > > Right ... let's call it "default_config.pl" or some such. Otherwise it looks sane enough. I don't think the "parens on trailing conditions" issue is anything other than just a matter of taste. I often use them because I've occasionally been caught by not doing so. cheers andrew
Andrew Dunstan wrote: > I don't think the "parens on trailing conditions" issue is anything > other than just a matter of taste. Agreed -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
On Sun, Jan 3, 2010 at 05:13, Andrew Dunstan <andrew@dunslane.net> wrote: > > > Peter Eisentraut wrote: >> >> On fre, 2010-01-01 at 16:32 +0100, Magnus Hagander wrote: >> >>> >>> I therefor propose that we rename this file to "config.pl.default", >>> and change the scripts to first load config.pl.default, and then load >>> config.pl if it exists. >>> >> >> I'd keep the naming so that the extension .pl is preserved. Helps >> editors and such. >> >> > > Right ... let's call it "default_config.pl" or some such. Otherwise it looks > sane enough. I don't think the "parens on trailing conditions" issue is > anything other than just a matter of taste. I often use them because I've > occasionally been caught by not doing so. Ok, I've applied this patch with the name change to config_default.pl (that way it still sorts next to config.pl etc, which was how Dave convinced me of the config.pl.default name in the first place :D) -- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/