Fix up xfs out-of-tree builds. (a.k.a. external modules)
Change -I include directives to find headers in the out-of-tree spot.
This allows a directory containing only xfs files to be built as:
# make -C /path/to/kernel M=`pwd`
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
Index: linux/fs/xfs/Makefile
===================================================================
--- linux.orig/fs/xfs/Makefile
+++ linux/fs/xfs/Makefile
@@ -16,7 +16,7 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
-EXTRA_CFLAGS += -Ifs/xfs -Ifs/xfs/linux-2.6 -funsigned-char
+EXTRA_CFLAGS += -I$(src) -I$(src)/linux-2.6 -funsigned-char
XFS_LINUX := linux-2.6
Index: linux/fs/xfs/dmapi/Makefile
===================================================================
--- linux.orig/fs/xfs/dmapi/Makefile
+++ linux/fs/xfs/dmapi/Makefile
@@ -16,8 +16,8 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
-EXTRA_CFLAGS += -I $(TOPDIR)/fs/xfs -I $(TOPDIR)/fs/xfs/linux-2.6
-EXTRA_CFLAGS += -I $(TOPDIR)/fs/dmapi
+EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../linux-2.6
+EXTRA_CFLAGS += -I$(TOPDIR)/fs/dmapi
ifeq ($(CONFIG_XFS_DEBUG),y)
EXTRA_CFLAGS += -g -DDEBUG
Index: linux/fs/xfs/quota/Makefile
===================================================================
--- linux.orig/fs/xfs/quota/Makefile
+++ linux/fs/xfs/quota/Makefile
@@ -16,7 +16,7 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
-EXTRA_CFLAGS += -I $(TOPDIR)/fs/xfs -I $(TOPDIR)/fs/xfs/linux-2.6
+EXTRA_CFLAGS += -I$(src)/.. -I$(src)/../linux-2.6
ifeq ($(CONFIG_XFS_DEBUG),y)
EXTRA_CFLAGS += -g
|