summaryrefslogtreecommitdiffstats
path: root/Configurations
diff options
context:
space:
mode:
authorTanzinul Islam <tanzinul.islam@gmail.com>2020-11-26 15:38:40 +0000
committerDmitry Belyavskiy <beldmit@gmail.com>2021-04-19 11:05:54 +0200
commit583a9f1f6b0d0842f8d63a21c335b24494fc67bc (patch)
treed614828a30a913a214b7009d560d9116317fb1e3 /Configurations
parentf1ee757daaf8ea1000c6558abd1ffc8ad5234c09 (diff)
Use cmd.exe to export env vars before commands
Microsoft NMake runs the entire command block in a single `cmd.exe` session, so environment variables exported with `set` are seen by the following commands. C++Builder's `make.exe` doesn't use `cmd.exe` but executes each command line separately. While it emulates only certain shell features itself, `set` isn't one of them. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/13540)
Diffstat (limited to 'Configurations')
-rw-r--r--Configurations/windows-makefile.tmpl15
1 files changed, 4 insertions, 11 deletions
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index d9cc0e53e3..3160984ccc 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -415,19 +415,14 @@ all: build_sw build_docs
test: tests
{- dependmagic('tests'); -}: build_programs_nodep build_modules_nodep copy-utils
@{- output_off() if $disabled{tests}; "" -}
- set SRCTOP=$(SRCDIR)
- set BLDTOP=$(BLDDIR)
- set PERL=$(PERL)
- set FIPSKEY=$(FIPSKEY)
- "$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS)
+ cmd /C "set "SRCTOP=$(SRCDIR)" & set "BLDTOP=$(BLDDIR)" & set "PERL=$(PERL)" & set "FIPSKEY=$(FIPSKEY)" & "$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS)"
@{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
@$(ECHO) "Tests are not supported with your chosen Configure options"
@{- output_on() if !$disabled{tests}; "" -}
list-tests:
@{- output_off() if $disabled{tests}; "" -}
- @set SRCTOP=$(SRCDIR)
- @"$(PERL)" "$(SRCDIR)\test\run_tests.pl" list
+ @cmd /C "set "SRCTOP=$(SRCDIR)" & "$(PERL)" "$(SRCDIR)\test\run_tests.pl" list"
@{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
@$(ECHO) "Tests are not supported with your chosen Configure options"
@{- output_on() if !$disabled{tests}; "" -}
@@ -711,8 +706,7 @@ EOF
if ($args{src} =~ /\.S$/) {
return <<"EOF";
$target: "$gen0" $deps
- set ASM=\$(AS)
- $generator \$@.S
+ cmd /C "set "ASM=\$(AS)" & $generator \$@.S"
\$(CPP) $incs $cppflags $defs \$@.S > \$@.i
move /Y \$@.i \$@
del /Q \$@.S
@@ -721,8 +715,7 @@ EOF
# Otherwise....
return <<"EOF";
$target: "$gen0" $deps
- set ASM=\$(AS)
- $generator \$@
+ cmd /C "set "ASM=\$(AS)" & $generator \$@"
EOF
}
return <<"EOF";