A few small issues to fix the moving of modpost.
A few files was missing in the commit and one change needed.
Also bk ignored the files in their new location.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
always := $(host-progs)
subdir-$(CONFIG_MODVERSIONS) += genksyms
-subdir-y += modpost
+subdir-y += mod
# Let clean descend into subdirs
subdir- += basic lxdialog kconfig package
--- /dev/null
+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
/* 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 { \