[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Wed Jul 11 12:55:28 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  5c06c7d748161697642bd4d1369acad4297abb3c (commit)
       via  566e333e52998e478ac6928c5d06bd89f4b37aba (commit)
      from  356d63458279f05e361de5f69f8d8acb75ada925 (commit)


- Log -----------------------------------------------------------------
commit 5c06c7d748161697642bd4d1369acad4297abb3c
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Jul 11 11:05:15 2018 +0200

    Windows: avoid using 'rem' in the nmake makefile
    
    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 at openssl.org>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/6686)
    
    (cherry picked from commit 1b6a0a261e22eb5a574bdb75da208817ffa2fbba)

commit 566e333e52998e478ac6928c5d06bd89f4b37aba
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Jul 10 14:12:33 2018 +0200

    Windows: fix echo for nmake
    
    It seems that nmake first tries to run executables on its own, and
    only pass commands to cmd if that fails.  That means it's possible to
    have nmake run something like 'echo.exe' when the builtin 'echo'
    command was expected, which might give us unexpected results.
    
    To get around this, we create our own echoing script and call it
    explicitly from the nmake makefile.
    
    Fixes #6670
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/6686)
    
    (cherry picked from commit 9abce88b4b0055d6238a838aa00360152e185f02)

-----------------------------------------------------------------------

Summary of changes:
 Configurations/windows-makefile.tmpl | 51 ++++++++++++++++++------------------
 util/echo.pl                         | 12 +++++++++
 2 files changed, 38 insertions(+), 25 deletions(-)
 create mode 100644 util/echo.pl

diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index bd9868b..af11ff4 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -182,6 +182,9 @@ MTOUTFLAG={- $target{mtoutflag} || "-outputresource:" -}$(OSSL_EMPTY)
 AS={- $target{as} -}
 ASFLAGS={- $target{asflags} -}
 ASOUTFLAG={- $target{asoutflag} -}$(OSSL_EMPTY)
+
+ECHO="$(PERL)" "$(SRCDIR)\util\echo.pl"
+
 PERLASM_SCHEME= {- $target{perlasm_scheme} -}
 
 PROCESSOR= {- $config{processor} -}
@@ -207,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)
@@ -216,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(); } "" -}
-	@echo "Tests are not supported with your chosen Configure options"
-	@rem {- output_on() if !$disabled{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:
-	@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(); } "" -}
-	@echo "Tests are not supported with your chosen Configure options"
-	@rem {- output_on() if !$disabled{tests}; "" -}
+	@{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
+	@$(ECHO) "Tests are not supported with your chosen Configure options"
+	@{- output_on() if !$disabled{tests}; "" -}
 
 install: install_sw install_ssldirs install_docs
 
@@ -285,13 +288,13 @@ install_ssldirs:
                                         "$(OPENSSLDIR)\misc"
 
 install_dev:
-	@if "$(INSTALLTOP)"=="" ( echo INSTALLTOP should not be empty & exit 1 )
-	@echo *** Installing development files
+	@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"
@@ -307,8 +310,8 @@ install_dev:
 uninstall_dev:
 
 install_engines:
-	@if "$(INSTALLTOP)"=="" ( echo INSTALLTOP should not be empty & exit 1 )
-	@echo *** Installing engines
+	@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
+	@$(ECHO) "*** Installing engines"
 	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(ENGINESDIR)"
 	@if not "$(ENGINES)"=="" \
 	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINES) "$(ENGINESDIR)"
@@ -318,8 +321,8 @@ install_engines:
 uninstall_engines:
 
 install_runtime:
-	@if "$(INSTALLTOP)"=="" ( echo INSTALLTOP should not be empty & exit 1 )
-	@echo *** Installing runtime files
+	@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
+	@$(ECHO) "*** Installing runtime files"
 	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\bin"
 	@if not "$(SHLIBS)"=="" \
 	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBS) "$(INSTALLTOP)\bin"
@@ -344,14 +347,14 @@ uninstall_html_docs:
 # Building targets ###################################################
 
 configdata.pm: "$(SRCDIR)\Configure" {- join(" ", map { '"'.$_.'"' } @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}}) -}
-	@echo "Detected changed: $?"
-	@echo "Reconfiguring..."
+	@$(ECHO) "Detected changed: $?"
+	@$(ECHO) "Reconfiguring..."
 	"$(PERL)" "$(SRCDIR)\Configure" reconf
-	@echo "**************************************************"
-	@echo "***                                            ***"
-	@echo "***   Please run the same make command again   ***"
-	@echo "***                                            ***"
-	@echo "**************************************************"
+	@$(ECHO) "**************************************************"
+	@$(ECHO) "***                                            ***"
+	@$(ECHO) "***   Please run the same make command again   ***"
+	@$(ECHO) "***                                            ***"
+	@$(ECHO) "**************************************************"
 	@exit 1
 
 {-
@@ -605,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 at rem No support to produce $type ".join(", ", @{$unified_info{dirinfo}->{$dir}->{products}->{$type}});
                   }
               }
           }
diff --git a/util/echo.pl b/util/echo.pl
new file mode 100644
index 0000000..d90e521
--- /dev/null
+++ b/util/echo.pl
@@ -0,0 +1,12 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+use Getopt::Std;
+
+our $opt_n = 0;
+
+getopts('n') or die "Invalid option: $!\n";
+
+print join(' ', @ARGV);
+print "\n" unless $opt_n;


More information about the openssl-commits mailing list