From 0b64b2717272da0486ccb5e7d4cc9a30aa30afa6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 1 Oct 2009 00:08:33 +0200 Subject: [PATCH] build: ignore srcdir layout on install Kbuild would install the .ko module files relative to their source directory, i.e. extensions/xt_quota.ko -> /lib/modules/%/extra/xt_quota.ko extensions/ACCOUNT/xt_ACCOUNT.ko -> /lib/modules/%/extra/ACCOUNT/xt_ACCOUNT.ko Add a hack to Makefile.am so that it all goes into extra/ only, without any further subdirectories created. This is strictly a hack as it pokes with Kbuild internals. Putting the ext-mod-dir override into extensions/Kbuild would not do, it is overridden by $linux/scripts/Makefile.modinst, so a higher priority override is needed (make command line by means of Makefile.am invoking make). --- extensions/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/Makefile.am b/extensions/Makefile.am index 2c1fe26..56f9471 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -10,7 +10,7 @@ modules: ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} modules; fi; modules_install: - ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} INSTALL_MOD_PATH=${DESTDIR} modules_install; fi; + ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} INSTALL_MOD_PATH=${DESTDIR} ext-mod-dir='$${INSTALL_MOD_DIR}' modules_install; fi; clean_modules: ${AM_V_silent}if [ -n "${kbuilddir}" ]; then ${MAKE} ${_kcall} clean; fi;