[openib-general] make.inc

Michael S. Tsirkin mst at mellanox.co.il
Tue Dec 28 11:53:28 PST 2004


I got tired of editing make.inc, and I made this patch to figure it out
on the fly.
 
Index: libcommon/Makefile
===================================================================
--- libcommon/Makefile	(revision 1408)
+++ libcommon/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../make.inc
+OPENIB_MANAGEMENT=..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 SRCS:=$(wildcard *.c)
 LIB_OBJS:=$(SRCS:.c=.lo)
Index: make.inc
===================================================================
--- make.inc	(revision 1408)
+++ make.inc	(working copy)
@@ -2,9 +2,12 @@
 # Openib usermode common make file variables
 #
 
-# OPENIB_ROOT: root of OPIBIB src tree
-OPENIB_ROOT=/home/openib/svn/gen2/trunk/src/
+OPENIB_ROOT:=$(shell pwd)/${OPENIB_MANAGEMENT}/../..
 
+#Uncomment to override the default above
+# OPENIB_ROOT: root of OPENIB src tree
+#OPENIB_ROOT=/usr/src/openib/src
+
 # OPENIB_KERN: kenel used to compile modules
 OPENIB_KERN=$(OPENIB_ROOT)/linux-2.6
 
Index: diags/net/smpdump/Makefile
===================================================================
--- diags/net/smpdump/Makefile	(revision 1408)
+++ diags/net/smpdump/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../../../make.inc
+OPENIB_MANAGEMENT=../../..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 BIN_OBJS=smpdump.o
 BIN_LIBS=$(OPENIB_USR_LIB)/libcommon.la $(OPENIB_USR_LIB)/libumad.la
Index: diags/host/ibstat/Makefile
===================================================================
--- diags/host/ibstat/Makefile	(revision 1408)
+++ diags/host/ibstat/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../../../make.inc
+OPENIB_MANAGEMENT=../../..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 BIN_OBJS=ibstat.o
 BIN_LIBS=$(OPENIB_USR_LIB)/libcommon.la $(OPENIB_USR_LIB)/libumad.la
Index: diags/host/scripts/Makefile
===================================================================
--- diags/host/scripts/Makefile	(revision 1408)
+++ diags/host/scripts/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../../../make.inc
+OPENIB_MANAGEMENT=../../..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 SCRIPT_TARGET=ibstatus
 
Index: util/mad_test/Makefile
===================================================================
--- util/mad_test/Makefile	(revision 1408)
+++ util/mad_test/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../../make.inc
+OPENIB_MANAGEMENT=../..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 BIN_OBJS=mad_test.o
 BIN_LIBS=$(OPENIB_USR_LIB)/libcommon.la
Index: libumad/Makefile
===================================================================
--- libumad/Makefile	(revision 1408)
+++ libumad/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../make.inc
+OPENIB_MANAGEMENT=..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 SRCS=$(wildcard *.c)
 LIB_OBJS=$(SRCS:.c=.lo)
Index: osm/opensm/Makefile
===================================================================
--- osm/opensm/Makefile	(revision 1408)
+++ osm/opensm/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../../make.inc
+OPENIB_MANAGEMENT=../..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 # We need to provide a filtered C source files to avoid inclussion 
 # of the other (non selected) vendor sources:
Index: osm/complib/Makefile
===================================================================
--- osm/complib/Makefile	(revision 1408)
+++ osm/complib/Makefile	(working copy)
@@ -1,4 +1,5 @@
-include ../../make.inc
+OPENIB_MANAGEMENT=../..
+include ${OPENIB_MANAGEMENT}/make.inc
 
 SRCS=$(wildcard *.c)
 LIB_OBJS=$(SRCS:.c=.lo)



More information about the general mailing list