aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 344defd0f918..f8d1fd525e17 100644
--- a/Makefile
+++ b/Makefile
@@ -1021,9 +1021,14 @@ ifdef CONFIG_MODULES
1021all: modules 1021all: modules
1022 1022
1023# Build modules 1023# Build modules
1024#
1025# A module can be listed more than once in obj-m resulting in
1026# duplicate lines in modules.order files. Those are removed
1027# using awk while concatenating to the final file.
1024 1028
1025PHONY += modules 1029PHONY += modules
1026modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) 1030modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
1031 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
1027 @echo ' Building modules, stage 2.'; 1032 @echo ' Building modules, stage 2.';
1028 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost 1033 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
1029 1034
@@ -1051,6 +1056,7 @@ _modinst_:
1051 rm -f $(MODLIB)/build ; \ 1056 rm -f $(MODLIB)/build ; \
1052 ln -s $(objtree) $(MODLIB)/build ; \ 1057 ln -s $(objtree) $(MODLIB)/build ; \
1053 fi 1058 fi
1059 @cp -f $(objtree)/modules.order $(MODLIB)/
1054 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst 1060 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
1055 1061
1056# This depmod is only for convenience to give the initial 1062# This depmod is only for convenience to give the initial
@@ -1110,7 +1116,7 @@ clean: archclean $(clean-dirs)
1110 @find . $(RCS_FIND_IGNORE) \ 1116 @find . $(RCS_FIND_IGNORE) \
1111 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ 1117 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1112 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ 1118 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1113 -o -name '*.symtypes' \) \ 1119 -o -name '*.symtypes' -o -name 'modules.order' \) \
1114 -type f -print | xargs rm -f 1120 -type f -print | xargs rm -f
1115 1121
1116# mrproper - Delete all generated files, including .config 1122# mrproper - Delete all generated files, including .config