Move modpost files to a new subdir [2/2]
PATCH 1/1 Move modpost files to a new subdir [2/2]
Fix up path names and Makefiles for modpost.
--
Brian Gerst
scripts/Makefile +3 -16
@@ -5,24 +5,11 @@ # docproc: Preprocess .tmpl file in order to generate .sgml docs # conmakehash: Create arrays for initializing the kernel console tables -host-progs := conmakehash kallsyms modpost mk_elfconfig pnmtologo bin2c -always := $(host-progs) empty.o - -modpost-objs := modpost.o file2alias.o sumversion.o +host-progs := conmakehash kallsyms pnmtologo bin2c +always := $(host-progs) subdir-$(CONFIG_MODVERSIONS) += genksyms +subdir-y += modpost # Let clean descend into subdirs subdir- += basic lxdialog kconfig package - -# dependencies on generated files need to be listed explicitly - -$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h - -quiet_cmd_elfconfig = MKELF $@ - cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@ - -$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE - $(call if_changed,elfconfig) - -targets += elfconfig.h
scripts/Makefile.modpost +1 -1
@@ -50,7 +50,7 @@ # Step 2), invoke modpost # Includes step 3,4 quiet_cmd_modpost = MODPOST - cmd_modpost = scripts/modpost \ + cmd_modpost = scripts/modpost/modpost \ $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \ $(filter-out FORCE,$^)
scripts/modpost/file2alias.c +1 -1
@@ -27,7 +27,7 @@/* Big exception to the "don't include kernel headers into userspace, which * even potentially has different endianness and word sizes, since * we handle those differences explicitly below */ -#include "../include/linux/mod_devicetable.h" +#include "../../include/linux/mod_devicetable.h" #define ADD (str, sep, cond, field) \ do { \
scripts/modpost/Makefile +16 -0
@@ -0,0 +1,16 @@ +host-progs := modpost mk_elfconfig +always := $(host-progs) empty.o + +modpost-objs := modpost.o file2alias.o sumversion.o + +# dependencies on generated files need to be listed explicitly + +$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h + +quiet_cmd_elfconfig = MKELF $@ + cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@ + +$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE + $(call if_changed,elfconfig) + +targets += elfconfig.h
Quoted 1 line · Brian Gerst
Fix up path names and Makefiles for modpost.
I like the change and will apply to my local kbuild tree.
Sam