From: Andy Polyakov Date: Tue, 30 Dec 2008 13:20:17 +0000 (+0000) Subject: Styling update to makefiles: eliminate redundant pipes. X-Git-Tag: OpenSSL_0_9_8k^2~75 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b3b201b6f723506aa86d4850662763784df7eda0;p=oweals%2Fopenssl.git Styling update to makefiles: eliminate redundant pipes. --- diff --git a/Makefile.org b/Makefile.org index ea0d72baaf..580a26937a 100644 --- a/Makefile.org +++ b/Makefile.org @@ -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 diff --git a/Makefile.shared b/Makefile.shared index 881e0ddc47..f30ead1927 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -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} \