X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=scripts%2FMakefile.modpost;h=69897d5d3a7004a0fc8dc5497b1156802cd86c22;hb=a23680594da7a9e2696dbcf4f023e9273e2fa40b;hp=952fff4855467fb9cadeea2c767ffe902f9e9c0e;hpb=9b326948c23908692d7dfe56ed149840d3829eaa;p=linux.git diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 952fff485546..69897d5d3a70 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -50,12 +50,10 @@ MODPOST = scripts/mod/modpost \ $(if $(CONFIG_MODVERSIONS),-m) \ $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ - $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ - $(if $(KBUILD_MODPOST_WARN),-w) \ - $(if $(filter nsdeps,$(MAKECMDGOALS)),-d) + $(if $(KBUILD_MODPOST_WARN),-w) ifdef MODPOST_VMLINUX @@ -67,10 +65,14 @@ __modpost: else -# When building external modules load the Kbuild file to retrieve EXTRA_SYMBOLS info -ifneq ($(KBUILD_EXTMOD),) +MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - \ + $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) -# set src + obj - they may be used when building the .mod.c file +ifeq ($(KBUILD_EXTMOD),) +MODPOST += $(wildcard vmlinux) +else + +# set src + obj - they may be used in the modules's Makefile obj := $(KBUILD_EXTMOD) src := $(obj) @@ -79,8 +81,6 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) endif -MODPOST += $(subst -i,-n,$(filter -i,$(MAKEFLAGS))) -s -T - $(wildcard vmlinux) - # find all modules listed in modules.order modules := $(sort $(shell cat $(MODORDER))) @@ -96,8 +96,6 @@ ifneq ($(KBUILD_MODPOST_NOFINAL),1) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal endif -nsdeps: __modpost - endif .PHONY: $(PHONY)