Commit 991343a9 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Remove xfs vpath hack

xfs.o is built as one modules out of objects distributed into
multiple subdirs. That is okay with the current kbuild, you just
have to include the path for objects which reside in a subdir, then.

xfs used vpath instead of explicitly adding the paths, which is
inconsistent and conflicts e.g. with proper module version generation.
parent 83a26d41
...@@ -207,7 +207,7 @@ $(MODVERDIR)/%.ver: %.c FORCE ...@@ -207,7 +207,7 @@ $(MODVERDIR)/%.ver: %.c FORCE
targets := $(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver)) targets := $(addprefix $(MODVERDIR)/,$(export-objs:.o=.ver))
fastdep: $(targets) $(subdir-ym) fastdep: $(targets) $(subdir-ym)
@mkdir -p $(TOPDIR)/.tmp_export-objs/modules/$(RELDIR) @mkdir -p $(dir $(addprefix $(TOPDIR)/.tmp_export-objs/modules/$(RELDIR),$(export-objs:.o=.ver)))
@touch $(addprefix $(TOPDIR)/.tmp_export-objs/modules/$(RELDIR)/,$(export-objs:.o=.ver)) @touch $(addprefix $(TOPDIR)/.tmp_export-objs/modules/$(RELDIR)/,$(export-objs:.o=.ver))
endif # export-objs endif # export-objs
...@@ -245,7 +245,6 @@ O_TARGET := built-in.o ...@@ -245,7 +245,6 @@ O_TARGET := built-in.o
endif endif
endif endif
# The echo suppresses the "Nothing to be done for first_rule"
first_rule: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \ first_rule: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
$(if $(KBUILD_MODULES),$(obj-m)) \ $(if $(KBUILD_MODULES),$(obj-m)) \
$(subdir-ym) $(subdir-ym)
......
...@@ -32,11 +32,6 @@ ...@@ -32,11 +32,6 @@
# Makefile for XFS on Linux. # Makefile for XFS on Linux.
# #
# we also have source in the subdirectories..
vpath %.c = . linux pagebuf support
# This needs -I. because everything does #include <xfs.h> instead of "xfs.h". # This needs -I. because everything does #include <xfs.h> instead of "xfs.h".
# The code is wrong, local files should be included using "xfs.h", not <xfs.h> # The code is wrong, local files should be included using "xfs.h", not <xfs.h>
# but I am not going to change every file at the moment. # but I am not going to change every file at the moment.
...@@ -49,7 +44,8 @@ ifeq ($(CONFIG_PAGEBUF_DEBUG),y) ...@@ -49,7 +44,8 @@ ifeq ($(CONFIG_PAGEBUF_DEBUG),y)
EXTRA_CFLAGS += -DPAGEBUF_TRACE EXTRA_CFLAGS += -DPAGEBUF_TRACE
endif endif
export-objs := page_buf.o ktrace.o xfs_globals.o export-objs := pagebuf/page_buf.o support/ktrace.o \
linux/xfs_globals.o
obj-$(CONFIG_XFS_FS) += xfs.o obj-$(CONFIG_XFS_FS) += xfs.o
...@@ -65,8 +61,8 @@ xfs-obj-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \ ...@@ -65,8 +61,8 @@ xfs-obj-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
xfs-obj-$(CONFIG_FS_POSIX_ACL) += xfs_acl.o xfs-obj-$(CONFIG_FS_POSIX_ACL) += xfs_acl.o
xfs-obj-$(CONFIG_FS_POSIX_CAP) += xfs_cap.o xfs-obj-$(CONFIG_FS_POSIX_CAP) += xfs_cap.o
xfs-obj-$(CONFIG_FS_POSIX_MAC) += xfs_mac.o xfs-obj-$(CONFIG_FS_POSIX_MAC) += xfs_mac.o
xfs-obj-$(CONFIG_PROC_FS) += xfs_stats.o xfs-obj-$(CONFIG_PROC_FS) += linux/xfs_stats.o
xfs-obj-$(CONFIG_SYSCTL) += xfs_sysctl.o xfs-obj-$(CONFIG_SYSCTL) += linux/xfs_sysctl.o
xfs-objs += $(xfs-obj-y) \ xfs-objs += $(xfs-obj-y) \
...@@ -118,11 +114,13 @@ xfs-objs += $(xfs-obj-y) \ ...@@ -118,11 +114,13 @@ xfs-objs += $(xfs-obj-y) \
xfs_rw.o xfs_rw.o
# Objects in pagebuf/ # Objects in pagebuf/
xfs-objs += page_buf.o \ xfs-objs += $(addprefix pagebuf/, \
page_buf_locking.o page_buf.o \
page_buf_locking.o)
# Objects in linux/ # Objects in linux/
xfs-objs += xfs_aops.o \ xfs-objs += $(addprefix linux/, \
xfs_aops.o \
xfs_behavior.o \ xfs_behavior.o \
xfs_file.o \ xfs_file.o \
xfs_fs_subr.o \ xfs_fs_subr.o \
...@@ -131,16 +129,17 @@ xfs-objs += xfs_aops.o \ ...@@ -131,16 +129,17 @@ xfs-objs += xfs_aops.o \
xfs_iops.o \ xfs_iops.o \
xfs_lrw.o \ xfs_lrw.o \
xfs_super.o \ xfs_super.o \
xfs_vnode.o xfs_vnode.o)
# Objects in support/ # Objects in support/
xfs-objs += debug.o \ xfs-objs += $(addprefix support/, \
debug.o \
kmem.o \ kmem.o \
ktrace.o \ ktrace.o \
move.o \ move.o \
mrlock.o \ mrlock.o \
qsort.o \ qsort.o \
uuid.o uuid.o)
# If both xfs and kdb modules are built in then xfsidbg is built in. If xfs is # If both xfs and kdb modules are built in then xfsidbg is built in. If xfs is
# a module and kdb modules are being compiled then xfsidbg must be a module, to # a module and kdb modules are being compiled then xfsidbg must be a module, to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment