Re: Reduce the number of special cases to build contrib modules on windows

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: David Rowley <dgrowleyml@gmail.com>, vignesh C <vignesh21@gmail.com>, Michael Paquier <michael@paquier.xyz>, Andres Freund <andres@anarazel.de>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-27T16:01:04Z
Lists: pgsql-hackers
On 2021-Jul-27, Dagfinn Ilmari Mannsåker wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

> > +		if (grep { $_ eq $ref} @{ $self->{references} } == 0)
> 
> I disagree.  Using grep in boolean context is perfectly idiomatic perl.
> What would be more idiomatic is List::Util::any, but that's not availble
> without upgrading List::Util from CPAN on Perls older than 5.20, so we
> can't use that.

I was wondering if instead of grepping the whole list for each addition
it would make sense to push always, and do a unique-ification step at
the end.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



Commits

  1. Remove some special cases from MSVC build scripts

  2. Adjust MSVC build scripts to parse Makefiles for defines

  3. Don't duplicate references and libraries in MSVC scripts

  4. Make the includes field an array in MSVC build scripts

  5. Use the AddFile function consistently in MSVC build scripts

  6. Remove seemingly unneeded include directory in MSVC scripts