[openib-general] [PATH TRIVIAL] opensm: management/Makefile: build rules improvement

Sasha Khapyorsky sashak at voltaire.com
Sun Aug 20 09:24:36 PDT 2006


Some minor additions to management/Makefile build rules - now this will
run autogen.sh and ./configure (without options) if needed.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---

 Makefile |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 770112a..9004f00 100644
--- a/Makefile
+++ b/Makefile
@@ -64,17 +64,17 @@ depend: rmdep subdirs
 .PHONY : subdirs
 subdirs:
 	@for i in $(SUBDIRS); do \
-		if [ -e $$i/Makefile ]; then \
-			if !(cd $$i; make $(BUILD_TARG)); then exit 1; fi \
-		fi \
+		test -x $$i/configure || ( cd $$i && ./autogen.sh || exit 1 ) ; \
+		test -e $$i/Makefile || ( cd $$i && ./configure || exit 1 ) ; \
+		( cd $$i && make ) || exit 1 ; \
 	done
 
 .PHONY : libs_install
 libs_install:
 	@for i in $(LIBS); do \
-		if [ -e $$i/Makefile ]; then \
-			if !(cd $$i; make install); then exit 1; fi \
-		fi \
+		test -x $$i/configure || ( cd $$i && ./autogen.sh || exit 1 ) ; \
+		test -e $$i/Makefile || ( cd $$i && ./configure || exit 1 ) ; \
+		( cd $$i && make && make install ) || exit 1 ; \
 	done
 
 export BUILD_TARG




More information about the general mailing list