From b3b201b6f723506aa86d4850662763784df7eda0 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 30 Dec 2008 13:20:17 +0000 Subject: [PATCH] Styling update to makefiles: eliminate redundant pipes. --- Makefile.org | 2 +- Makefile.shared | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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} \ -- 2.25.1