As I mentioned recently at <https://postgr.es/m/5d72f199-dc11-89a8-29d1-f20f9687c...@dunslane.net>, I want to get USE_MODULE_DB working for vcregress.pl. I started out writing code to strip this from the command line or get it from the environment, but then it struck me that if would be better to implement a general Makefile-like mechanism for handling FOO=bar type arguments on the command line, along the lines of the attached.
Thoughts? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index fc826da3ff..168ea7f82a 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -39,6 +39,14 @@ if (-e "src/tools/msvc/buildenv.pl") do "./src/tools/msvc/buildenv.pl"; } +my %settings; + +while (@ARGV && $ARGV[0] =~ /([A-Za-z]\w*)=(.*)/) +{ + $settings{$1}={$2}; + shift; +} + my $what = shift || ""; if ($what =~ /^(check|installcheck|plcheck|contribcheck|modulescheck|ecpgcheck|isolationcheck|upgradecheck|bincheck|recoverycheck|taptest)$/i