Windows: avoid using 'rem' in the nmake makefile
authorRichard Levitte <levitte@openssl.org>
Wed, 11 Jul 2018 09:05:15 +0000 (11:05 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 11 Jul 2018 12:55:18 +0000 (14:55 +0200)
To avoid the possibility that someone creates rem.exe, rem.bat or
rem.cmd, simply don't use it.  In the cases it was used, it was to
avoid empty lines, but it turns out that nmake handles those fine, so
no harm done.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/6686)

(cherry picked from commit 1b6a0a261e22eb5a574bdb75da208817ffa2fbba)

Configurations/windows-makefile.tmpl

index 4773f796d493c60ebc5ac8fa7dca71d8aefdf0a3..af11ff4c2688cbc126cef37ba5f1a9df07684e4a 100644 (file)
@@ -210,7 +210,7 @@ build_all_generated: $(GENERATED_MANDATORY) $(GENERATED)
 
 test: tests
 {- dependmagic('tests'); -}: build_programs_nodep build_engines_nodep
-       @rem {- output_off() if $disabled{tests}; "" -}
+       @{- output_off() if $disabled{tests}; "" -}
        -mkdir $(BLDDIR)\test\test-runs
        set SRCTOP=$(SRCDIR)
        set BLDTOP=$(BLDDIR)
@@ -219,17 +219,17 @@ test: tests
        set OPENSSL_ENGINES=$(MAKEDIR)\engines
        set OPENSSL_DEBUG_MEMORY=on
        "$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS)
-       @rem {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
+       @{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
        @$(ECHO) "Tests are not supported with your chosen Configure options"
-       @rem {- output_on() if !$disabled{tests}; "" -}
+       @{- output_on() if !$disabled{tests}; "" -}
 
 list-tests:
-       @rem {- output_off() if $disabled{tests}; "" -}
+       @{- output_off() if $disabled{tests}; "" -}
        @set SRCTOP=$(SRCDIR)
        @"$(PERL)" "$(SRCDIR)\test\run_tests.pl" list
-       @rem {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
+       @{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
        @$(ECHO) "Tests are not supported with your chosen Configure options"
-       @rem {- output_on() if !$disabled{tests}; "" -}
+       @{- output_on() if !$disabled{tests}; "" -}
 
 install: install_sw install_ssldirs install_docs
 
@@ -291,10 +291,10 @@ install_dev:
        @if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
        @$(ECHO) "*** Installing development files"
        @"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\include\openssl"
-       @rem {- output_off() unless grep { $_ eq "OPENSSL_USE_APPLINK" } @{$target{defines}}; "" -}
+       @{- output_off() unless grep { $_ eq "OPENSSL_USE_APPLINK" } @{$target{defines}}; "" -}
        @"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\ms\applink.c" \
                                       "$(INSTALLTOP)\include\openssl"
-       @rem {- output_on() unless grep { $_ eq "OPENSSL_USE_APPLINK" } @{$target{defines}}; "" -}
+       @{- output_on() unless grep { $_ eq "OPENSSL_USE_APPLINK" } @{$target{defines}}; "" -}
        @"$(PERL)" "$(SRCDIR)\util\copy.pl" "-exclude_re=/__DECC_" \
                                       "$(SRCDIR)\include\openssl\*.h" \
                                       "$(INSTALLTOP)\include\openssl"
@@ -608,8 +608,6 @@ EOF
               foreach my $prod (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {
                   if (dirname($prod) eq $dir) {
                       push @deps, $prod.$extinfo{$type};
-                  } else {
-                      push @actions, "\t@rem No support to produce $type ".join(", ", @{$unified_info{dirinfo}->{$dir}->{products}->{$type}});
                   }
               }
           }