From: Marc Dionne Date: Mon, 13 Jul 2009 02:03:36 +0000 (-0400) Subject: Linux build: properly install built kernel module X-Git-Tag: openafs-devel-1_5_61~126 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4c2a6c8799ab7e8fabee9af6d50a7c56cb220cf9;p=packages%2Fo%2Fopenafs.git 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 --- 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