RT3271: Don't use "if !" in shell lines
authorRich Salz <rsalz@openssl.org>
Tue, 9 Sep 2014 17:53:16 +0000 (13:53 -0400)
committerRich Salz <rsalz@openssl.org>
Tue, 9 Sep 2014 21:05:50 +0000 (17:05 -0400)
For portability don't use "if ! expr"

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit b999f66e34d19ae4d81263bc96b8b8d548d2e13c)

engines/Makefile
engines/ccgost/Makefile

index 636c04c7d8ffd74e6555783058c16b90f7c5a978..da6c8750b5ae44bb392d1c1eb0f7a5b5d0a914ba 100644 (file)
@@ -111,7 +111,10 @@ install:
                for l in $(LIBNAMES); do \
                        ( echo installing $$l; \
                          pfx=lib; \
-                         if ! expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
+                         if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
+                               sfx=".so"; \
+                               cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+                         else \
                                case "$(CFLAGS)" in \
                                *DSO_BEOS*)     sfx=".so";;     \
                                *DSO_DLFCN*)    sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;;    \
@@ -120,9 +123,6 @@ install:
                                *)              sfx=".bad";;    \
                                esac; \
                                cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         else \
-                               sfx=".so"; \
-                               cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
                          fi; \
                          chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
                          mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
index b7a5829a31c2579558df720b5a486bb3f663c911..bdd76b60a434455391ffac8bd96ce048c87f5b18 100644 (file)
@@ -45,7 +45,10 @@ install:
                set -e; \
                echo installing $(LIBNAME); \
                pfx=lib; \
-               if ! expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
+               if expr "$(PLATFORM)" : "Cygwin" >/dev/null; then \
+                       sfx=".so"; \
+                       cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+               else; \
                        case "$(CFLAGS)" in \
                        *DSO_BEOS*) sfx=".so";; \
                        *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
@@ -54,9 +57,6 @@ install:
                        *) sfx=".bad";; \
                        esac; \
                        cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-               else \
-                       sfx=".so"; \
-                       cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
                fi; \
                chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
                mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \