]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: ignore srcdir layout on install
authorJan Engelhardt <jengelh@medozas.de>
Wed, 30 Sep 2009 22:08:33 +0000 (00:08 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Wed, 30 Sep 2009 22:08:33 +0000 (00:08 +0200)
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

index 2c1fe2681f7de53b992e545c8bd7d673f425cdbd..56f947164eb77616662e4b53f02e65aabe61779a 100644 (file)
@@ -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;