diff options
author | Tanzinul Islam <tanzinul.islam@gmail.com> | 2020-11-26 15:38:40 +0000 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2021-04-19 11:05:54 +0200 |
commit | 583a9f1f6b0d0842f8d63a21c335b24494fc67bc (patch) | |
tree | d614828a30a913a214b7009d560d9116317fb1e3 /Configurations/windows-makefile.tmpl | |
parent | f1ee757daaf8ea1000c6558abd1ffc8ad5234c09 (diff) | |
download | openssl-new-583a9f1f6b0d0842f8d63a21c335b24494fc67bc.tar.gz |
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/windows-makefile.tmpl')
-rw-r--r-- | Configurations/windows-makefile.tmpl | 15 |
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"; |