Re: msvc, build and install with cygwin in the PATH

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Hannes Eder <Hannes(at)HannesEder(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: msvc, build and install with cygwin in the PATH
Date: 2007-05-30 10:28:28
Message-ID: 20070530102828.GA9787@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Wed, May 30, 2007 at 12:09:05PM +0200, Hannes Eder wrote:
> Andrew Dunstan schrieb:
> >Hannes Eder wrote:
> >>- open($D, "dir /b $subdirs $spec |") || croak "Could not list
> >>$spec\n";
> >>+ open($D, "cmd /c dir /b $subdirs $spec |") || croak "Could not
> >>list $spec\n";
> >>
> >
> >What the heck are we doing here anyway? We should be doing this a la
> >Perl - calling out to "dir /b" is surely not the best way to do this.
> >If we need to recurse we should use File::Find.
> I think since the code in src/tools/msvc is specific to MSVC and
> therefor, at least currently, specific to Windows. Calling out to "dir
> /b /s" or "cmd /c dir /b /s" works on WinNT and higher. On Win9x/ME
> command.com should be called instead of cmd.exe. In order to be more
> portable maybe we should use the environment variable COMSPEC, which
> should always point to an appropriate command processor.

We only support NT based OSes anyway, so I don't see COMSPEC as being a
problem. The reason it is the way it is is because that part was originally
just a .bat-file and I just copy/pasted the commands...

Are you actually *running* the script from inside cygwin? How else does it
pick up the wrong command processor?

> Is it worth doing this the "Perl-way" and using File::Find? If so, I can
> work an a patch for that.

It's certainly cleaner that way, but I don't find it a major issue. But I'd
rather see that fix than the other one.

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas ADI SD 2007-05-30 11:04:33 Re: TOAST usage setting
Previous Message Hannes Eder 2007-05-30 10:09:05 Re: msvc, build and install with cygwin in the PATH

Browse pgsql-patches by date

  From Date Subject
Next Message Hannes Eder 2007-05-30 11:56:24 Re: msvc, build and install with cygwin in the PATH
Previous Message Hannes Eder 2007-05-30 10:09:05 Re: msvc, build and install with cygwin in the PATH