summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-07-10 14:12:33 +0200
committerRichard Levitte <levitte@openssl.org>2018-07-11 14:53:54 +0200
commit566e333e52998e478ac6928c5d06bd89f4b37aba (patch)
tree4de77b87ed688fe3792995511243fd4134ca893e /util
parent356d63458279f05e361de5f69f8d8acb75ada925 (diff)
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@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/6686) (cherry picked from commit 9abce88b4b0055d6238a838aa00360152e185f02)
Diffstat (limited to 'util')
-rw-r--r--util/echo.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/echo.pl b/util/echo.pl
new file mode 100644
index 0000000000..d90e52129b
--- /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;