Styling update to makefiles: eliminate redundant pipes.
authorAndy Polyakov <appro@openssl.org>
Tue, 30 Dec 2008 13:20:17 +0000 (13:20 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 30 Dec 2008 13:20:17 +0000 (13:20 +0000)
Makefile.org
Makefile.shared

index ea0d72baafe99d67b4e651b391f424b110f533c5..580a26937a9a4ee549052318b5d091563668d588 100644 (file)
@@ -225,7 +225,7 @@ BUILD_CMD=  if [ -d "$$dir" ]; then \
            fi
 RECURSIVE_BUILD_CMD=for dir in $(DIRS); do $(BUILD_CMD); done
 BUILD_ONE_CMD=\
-       if echo " $(DIRS) " | grep " $$dir " >/dev/null 2>/dev/null; then \
+       if expr " $(DIRS) " : ".* $$dir " >/dev/null 2>&1; then \
                $(BUILD_CMD); \
        fi
 
index 881e0ddc4782c51a76a9e9892e34d5d2d34fc581..f30ead1927e7d201304a74162450b97ad1137aed 100644 (file)
@@ -93,7 +93,7 @@ LINK_APP=     \
   ( $(SET_X);   \
     LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
     LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
-    LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
+    LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t;d' | uniq`; \
     LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
     LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
     $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
@@ -103,7 +103,7 @@ LINK_SO=    \
     LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \
     SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \
     SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
-    LIBPATH=`for x in $$LIBDEPS; do if echo $$x | grep '^ *-L' > /dev/null 2>&1; then echo $$x | sed -e 's/^ *-L//'; fi; done | uniq`; \
+    LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t;d' | uniq`; \
     LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
     LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
     $${SHAREDCMD} $${SHAREDFLAGS} \