From 1bb381227b432676451ead3f9d4b92352464e9cc Mon Sep 17 00:00:00 2001 From: Tanzinul Islam Date: Sat, 7 Nov 2020 12:52:30 +0000 Subject: Avoid "&&" in windows-makefile.tmpl The `make.exe` utility shipped with Embarcadero C++Builder has a special meaning for the [`&&` operator in commands][1]. This meaning is retained even in Microsoft NMake compatibility mode (`make -N`). Split all commands using this shell (`cmd.exe`) operator into two commands. [1]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/MAKE_Rules_(Explicit_and_Implicit)_and_Commands#MAKE_Command_Operators Reviewed-by: Richard Levitte Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/13540) --- Configurations/windows-makefile.tmpl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 050d618a23..56baa54301 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -29,7 +29,7 @@ sub dependmagic { my $target = shift; - return "$target: build_generated\n\t\$(MAKE) /\$(MAKEFLAGS) depend && \$(MAKE) /\$(MAKEFLAGS) _$target\n_$target"; + return "$target: build_generated\n\t\$(MAKE) /\$(MAKEFLAGS) depend\n\t\$(MAKE) /\$(MAKEFLAGS) _$target\n_$target"; } ''; -} @@ -706,7 +706,8 @@ EOF $target: "$gen0" $deps set ASM=\$(AS) $generator \$@.S - \$(CPP) $incs $cppflags $defs \$@.S > \$@.i && move /Y \$@.i \$@ + \$(CPP) $incs $cppflags $defs \$@.S > \$@.i + move /Y \$@.i \$@ del /Q \$@.S EOF } @@ -719,7 +720,8 @@ EOF } return <<"EOF"; $target: "$gen0" $deps - \$(CPP) $incs $cppflags $defs "$gen0" > \$@.i && move /Y \$@.i \$@ + \$(CPP) $incs $cppflags $defs "$gen0" > \$@.i + move /Y \$@.i \$@ EOF } elsif ($gen0 =~ m|^.*\.in$|) { # @@ -819,7 +821,8 @@ EOF } elsif ($srcs[0] =~ /.S$/) { return <<"EOF"; $obj: $deps - \$(CC) /EP -D__ASSEMBLER__ $cflags $defs $srcs > \$@.asm && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm + \$(CC) /EP -D__ASSEMBLER__ $cflags $defs $srcs > \$@.asm + \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm EOF } my $recipe = <<"EOF"; @@ -861,7 +864,7 @@ $dll: $deps IF EXIST $full.manifest DEL /F /Q $full.manifest IF EXIST \$@ DEL /F /Q \$@ \$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) \\ - /implib:$import \$(LDOUTFLAG)$dll$shared_def @<< || (DEL /Q \$(\@B).* $import && EXIT 1) + /implib:$import \$(LDOUTFLAG)$dll$shared_def @<< || (DEL /Q \$(\@B).* $import; EXIT 1) $objs $linklibs\$(LIB_EX_LIBS) << @@ -894,7 +897,7 @@ EOF $dso: $deps IF EXIST $dso.manifest DEL /F /Q $dso.manifest \$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \\ - \$(LDOUTFLAG)$dso$shared_def @<< || (DEL /Q \$(\@B).* $dso_n.* && EXIT 1) + \$(LDOUTFLAG)$dso$shared_def @<< || (DEL /Q \$(\@B).* $dso_n.*; EXIT 1) $objs $linklibs \$(DSO_EX_LIBS) << -- cgit v1.2.3