From 4c2a6c8799ab7e8fabee9af6d50a7c56cb220cf9 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Sun, 12 Jul 2009 22:03:36 -0400 Subject: [PATCH] Linux build: properly install built kernel module Fix a problem introduced by the recent parallel make patches - the resulting kernel module was not getting copied to the install or dest location. Copy some of the code from the COMPDIRS target for INSTDIRS and DESTDIRS. We still have to call into the lower level make and have it install the module. Reviewed-on: http://gerrit.openafs.org/67 Verified-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/libafs/MakefileProto.LINUX.in | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/libafs/MakefileProto.LINUX.in b/src/libafs/MakefileProto.LINUX.in index e3babb525..474b09198 100644 --- a/src/libafs/MakefileProto.LINUX.in +++ b/src/libafs/MakefileProto.LINUX.in @@ -168,9 +168,30 @@ setup: # Compile SP and MP clients as requested -${INSTDIRS}: - -${DESTDIRS}: +${INSTDIRS} ${DESTDIRS}: ${COMPDIRS} + if [ "${LINUX_KERNEL_PACKAGING}" ] ; then \ + TARGPREFIX="pack_"; \ + fi ; \ + for m in ${MPS} ; do \ + KDIR=${KOBJ}-${LINUX_VERSION}${LINUX_MODULE_NAME}-$$m ; \ + echo Building in directory: $${KDIR} ; \ + if [ "$$m" = "MP" ] ; then \ + SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ ${LOCAL_SMP_DEF}" ; \ + TARG="libafs.mp" ; \ + elif [ "$$m" = "EP" ] ; then \ + SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ ${LOCAL_SMP_DEF}" ; \ + TARG="libafs.ep" ; \ + elif [ "$$m" = "BM" ] ; then \ + SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ ${LOCAL_SMP_DEF}" ; \ + TARG="libafs.bm" ; \ + else \ + SMP_DEF="@RHCONFIG_SP@ ${LOCAL_SMP_DEF}" ; \ + TARG=libafs ; \ + fi ; \ + cd $${KDIR} ; \ + $(MAKE) -f Makefile.afs SMP_DEF="$${SMP_DEF}" $@_$${TARGPREFIX}$${TARG} CLIENT=${LINUX_VERSION}${LINUX_MODULE_NAME} KDIR=$${KDIR} || exit $$?; \ + cd ../ ; \ + done ${COMPDIRS}: setup $(RM) -f h -- 2.39.5