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:06:14 +0000 (17:06 -0400)
For portability don't use "if ! expr"

Reviewed-by: Geoff Thorpe <geoff@openssl.org>
engines/Makefile
engines/ccgost/Makefile

index 4bad384bfb36e26eff791de710d79ee95cc9099d..d0881f2977843dc80ee0e0055ded1b909e23e33a 100644 (file)
@@ -120,7 +120,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"`;;    \
@@ -129,9 +132,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 97fac82d6baef27753e0e1eda9671052073b9647..43e06fbeccc819ef8ad0ba9e77ba25ffc58f7390 100644 (file)
@@ -47,7 +47,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"`;; \
@@ -56,9 +59,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; \