Commit 54a6c2fc authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Kai Germaschewski

kbuild: Removed unused definitions

o Deleted subdir-n and subdir- handling in Makefile.build
o Deleted all host-progs related stuff in Makfile.modver
o In Makefile.modver also deleted everything related to composite objects
o Fixed an error when deleting a .ver file + .hdepend and then do make
  - filter-out in Makefile.modver was faulty
parent 17527296
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
src := $(obj) src := $(obj)
no-rules.make := 1
.PHONY: __build .PHONY: __build
__build: __build:
...@@ -16,8 +14,6 @@ include $(obj)/Makefile ...@@ -16,8 +14,6 @@ include $(obj)/Makefile
# Standard vars # Standard vars
comma := , comma := ,
empty :=
space := $(empty) $(empty)
# bug traps # bug traps
# =========================================================================== # ===========================================================================
...@@ -37,7 +33,7 @@ $(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2 ...@@ -37,7 +33,7 @@ $(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2
endif endif
ifndef obj ifndef obj
$(warning kbuild: Rules.make is included improperly) $(warning kbuild: Makefile.build is included improperly)
endif endif
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
...@@ -59,17 +55,12 @@ __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) ...@@ -59,17 +55,12 @@ __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
subdir-y += $(__subdir-y) subdir-y += $(__subdir-y)
__subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
subdir-m += $(__subdir-m) subdir-m += $(__subdir-m)
__subdir-n := $(patsubst %/,%,$(filter %/, $(obj-n)))
subdir-n += $(__subdir-n)
__subdir- := $(patsubst %/,%,$(filter %/, $(obj-)))
subdir- += $(__subdir-)
obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) obj-y := $(patsubst %/, %/built-in.o, $(obj-y))
obj-m := $(filter-out %/, $(obj-m)) obj-m := $(filter-out %/, $(obj-m))
# Subdirectories we need to descend into # Subdirectories we need to descend into
subdir-ym := $(sort $(subdir-y) $(subdir-m)) subdir-ym := $(sort $(subdir-y) $(subdir-m))
subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
# export.o is never a composite object, since $(export-objs) has a # export.o is never a composite object, since $(export-objs) has a
# fixed meaning (== objects which EXPORT_SYMBOL()) # fixed meaning (== objects which EXPORT_SYMBOL())
...@@ -114,8 +105,6 @@ multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) ...@@ -114,8 +105,6 @@ multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y)) multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m)) multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
clean-files := $(addprefix $(obj)/,$(clean-files))
host-progs := $(addprefix $(obj)/,$(host-progs)) host-progs := $(addprefix $(obj)/,$(host-progs))
host-progs-single := $(addprefix $(obj)/,$(host-progs-single)) host-progs-single := $(addprefix $(obj)/,$(host-progs-single))
host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi)) host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi))
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
src := $(obj) src := $(obj)
no-rules.make := 1
.PHONY: __clean .PHONY: __clean
__clean: __clean:
......
...@@ -4,15 +4,11 @@ ...@@ -4,15 +4,11 @@
src := $(obj) src := $(obj)
no-rules.make := 1
.PHONY: modules_install .PHONY: modules_install
modules_install: modules_install:
include .config include .config
#$(warning $(CONFIG_X86))
include $(obj)/Makefile include $(obj)/Makefile
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
src := $(obj) src := $(obj)
no-rules.make := 1
.PHONY: modver .PHONY: modver
modver: modver:
...@@ -13,6 +11,10 @@ include .config ...@@ -13,6 +11,10 @@ include .config
include $(obj)/Makefile include $(obj)/Makefile
# Standard vars
comma := ,
# Figure out what we need to build from the various variables # Figure out what we need to build from the various variables
# =========================================================================== # ===========================================================================
...@@ -32,31 +34,11 @@ __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) ...@@ -32,31 +34,11 @@ __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
subdir-y += $(__subdir-y) subdir-y += $(__subdir-y)
__subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
subdir-m += $(__subdir-m) subdir-m += $(__subdir-m)
__subdir-n := $(patsubst %/,%,$(filter %/, $(obj-n)))
subdir-n += $(__subdir-n)
__subdir- := $(patsubst %/,%,$(filter %/, $(obj-)))
subdir- += $(__subdir-)
obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) obj-y := $(patsubst %/, %/built-in.o, $(obj-y))
obj-m := $(filter-out %/, $(obj-m)) obj-m := $(filter-out %/, $(obj-m))
# Subdirectories we need to descend into # Subdirectories we need to descend into
subdir-ym := $(sort $(subdir-y) $(subdir-m)) subdir-ym := $(sort $(subdir-y) $(subdir-m))
subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
# export.o is never a composite object, since $(export-objs) has a
# fixed meaning (== objects which EXPORT_SYMBOL())
__obj-y = $(filter-out export.o,$(obj-y))
__obj-m = $(filter-out export.o,$(obj-m))
# if $(foo-objs) exists, foo.o is a composite object
multi-used-y := $(sort $(foreach m,$(__obj-y), $(if $($(m:.o=-objs)), $(m))))
multi-used-m := $(sort $(foreach m,$(__obj-m), $(if $($(m:.o=-objs)), $(m))))
# Build list of the parts of our composite objects, our composite
# objects depend on those (obviously)
multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)))
multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)))
# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live # $(subdir-obj-y) is the list of objects in $(obj-y) which do not live
# in the local directory # in the local directory
...@@ -69,30 +51,12 @@ real-objs-m := $(foreach m, $(obj-m), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m ...@@ -69,30 +51,12 @@ real-objs-m := $(foreach m, $(obj-m), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m
# Only build module versions for files which are selected to be built # Only build module versions for files which are selected to be built
export-objs := $(filter $(export-objs),$(real-objs-y) $(real-objs-m)) export-objs := $(filter $(export-objs),$(real-objs-y) $(real-objs-m))
host-progs-single := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m)))
host-progs-multi := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m)))
host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs))
# Add subdir path # Add subdir path
EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS))
obj-y := $(addprefix $(obj)/,$(obj-y))
obj-m := $(addprefix $(obj)/,$(obj-m))
export-objs := $(addprefix $(obj)/,$(export-objs)) export-objs := $(addprefix $(obj)/,$(export-objs))
subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
real-objs-y := $(addprefix $(obj)/,$(real-objs-y)) real-objs-y := $(addprefix $(obj)/,$(real-objs-y))
real-objs-m := $(addprefix $(obj)/,$(real-objs-m)) real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
multi-used-y := $(addprefix $(obj)/,$(multi-used-y))
multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
clean-files := $(addprefix $(obj)/,$(clean-files))
host-progs := $(addprefix $(obj)/,$(host-progs))
host-progs-single := $(addprefix $(obj)/,$(host-progs-single))
host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi))
host-progs-multi-objs := $(addprefix $(obj)/,$(host-progs-multi-objs))
# The temporary file to save gcc -MD generated dependencies must not # The temporary file to save gcc -MD generated dependencies must not
# contain a comma # contain a comma
...@@ -128,7 +92,7 @@ endif ...@@ -128,7 +92,7 @@ endif
# Don't include modversions.h, we're just about to generate it here. # Don't include modversions.h, we're just about to generate it here.
CFLAGS_MODULE := $(filter-out -include linux/modversions.h,$(CFLAGS_MODULE)) CFLAGS_MODULE := $(filter-out -include include/linux/modversions.h,$(CFLAGS_MODULE))
$(addprefix $(MODVERDIR)/,$(real-objs-y:.o=.ver)): modkern_cflags := $(CFLAGS_KERNEL) $(addprefix $(MODVERDIR)/,$(real-objs-y:.o=.ver)): modkern_cflags := $(CFLAGS_KERNEL)
$(addprefix $(MODVERDIR)/,$(real-objs-m:.o=.ver)): modkern_cflags := $(CFLAGS_MODULE) $(addprefix $(MODVERDIR)/,$(real-objs-m:.o=.ver)): modkern_cflags := $(CFLAGS_MODULE)
......
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