mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
linux-alternate-kernel-builddir-20081012
LICENSE IPL10 FIXES 121354 add support for KBUILD_OUTPUT=... builds.
This commit is contained in:
parent
322f7e0e9f
commit
726fc5b842
24
acinclude.m4
24
acinclude.m4
@ -190,6 +190,10 @@ AC_ARG_WITH([linux-kernel-headers],
|
||||
[AS_HELP_STRING([--with-linux-kernel-headers=path],
|
||||
[use the kernel headers found at path (optional, defaults to
|
||||
/usr/src/linux-2.4, then /usr/src/linux)])])
|
||||
AC_ARG_WITH([linux-kernel-build],
|
||||
[AS_HELP_STRING([--with-linux-kernel-build=path],
|
||||
[use the kernel build found at path(optional, defaults to
|
||||
/usr/src/linux-2.4, then /usr/src/linux)])])
|
||||
AC_ARG_WITH([bsd-kernel-headers],
|
||||
[AS_HELP_STRING([--with-bsd-kernel-headers=path],
|
||||
[use the kernel headers found at path (optional, defaults to
|
||||
@ -334,15 +338,20 @@ case $system in
|
||||
LINUX_KERNEL_PATH="/usr/src/linux"
|
||||
fi
|
||||
fi
|
||||
if test -f "$LINUX_KERNEL_PATH/include/linux/utsrelease.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
|
||||
if test "$with_linux_kernel_build" != "x"; then
|
||||
LINUX_KERNEL_BUILD="$with_linux_kernel_build"
|
||||
else
|
||||
LINUX_KERNEL_BUILD=$LINUX_KERNEL_PATH
|
||||
fi
|
||||
if test -f "$LINUX_KERNEL_BUILD/include/linux/utsrelease.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/utsrelease.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
|
||||
LINUX_VERSION="$linux_kvers"
|
||||
else
|
||||
if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
|
||||
if test -f "$LINUX_KERNEL_BUILD/include/linux/version.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
|
||||
if test "x$linux_kvers" = "x"; then
|
||||
if test -f "$LINUX_KERNEL_PATH/include/linux/version-up.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
|
||||
if test -f "$LINUX_KERNEL_BUILD/include/linux/version-up.h"; then
|
||||
linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_BUILD/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $[]2 }'|tail -n 1`
|
||||
if test "x$linux_kvers" = "x"; then
|
||||
|
||||
AC_MSG_ERROR(Linux headers lack version definition [2])
|
||||
@ -361,7 +370,7 @@ case $system in
|
||||
enable_kernel_module="no"
|
||||
fi
|
||||
fi
|
||||
if test ! -f "$LINUX_KERNEL_PATH/include/linux/autoconf.h"; then
|
||||
if test ! -f "$LINUX_KERNEL_BUILD/include/linux/autoconf.h"; then
|
||||
enable_kernel_module="no"
|
||||
fi
|
||||
if test "x$enable_kernel_module" = "xno"; then
|
||||
@ -1574,6 +1583,7 @@ AC_SUBST(ENABLE_KERNEL_MODULE)
|
||||
AC_SUBST(ENABLE_PTHREADED_UBIK)
|
||||
AC_SUBST(LIB_AFSDB)
|
||||
AC_SUBST(LINUX_KERNEL_PATH)
|
||||
AC_SUBST(LINUX_KERNEL_BUILD)
|
||||
AC_SUBST(HOST_CPU)
|
||||
AC_SUBST(BSD_KERNEL_PATH)
|
||||
AC_SUBST(BSD_KERNEL_BUILD)
|
||||
|
@ -27,8 +27,8 @@ $2
|
||||
|
||||
MODULE_LICENSE("http://www.openafs.org/dl/license10.html");
|
||||
_ACEOF
|
||||
echo make -C $LINUX_KERNEL_PATH M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
|
||||
make -C $LINUX_KERNEL_PATH M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
|
||||
echo make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD &&
|
||||
make -C $LINUX_KERNEL_BUILD M=$SRCDIR_PARENT/conftest.dir modules KBUILD_VERBOSE=1 >&AS_MESSAGE_LOG_FD 2>conftest.err &&
|
||||
! grep -i "^WARNING: .* undefined!$" conftest.err >/dev/null 2>&1
|
||||
then [$3]
|
||||
else
|
||||
|
@ -49,6 +49,7 @@ LEX = @LEX@
|
||||
LIB_AFSDB = @LIB_AFSDB@
|
||||
LIBS = @LIBS@
|
||||
LINUX_KERNEL_PATH = @LINUX_KERNEL_PATH@
|
||||
LINUX_KERNEL_BUILD = @LINUX_KERNEL_BUILD@
|
||||
LINUX_LIBAFS_NAME = @LINUX_LIBAFS_NAME@
|
||||
LINUX_KERNEL_PACKAGING = @LINUX_KERNEL_PACKAGING@
|
||||
LINUX_VERSION = @LINUX_VERSION@
|
||||
|
@ -64,6 +64,7 @@ COMMON_KERN_CFLAGS=$(KERN_DBG) $(KERN_OPTMZ) @LINUX_GCC_KOPTS@
|
||||
COMMON_DEFINES=-D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
|
||||
|
||||
LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
|
||||
LINUX_KERNEL_BUILD=@LINUX_KERNEL_BUILD@
|
||||
|
||||
# System specific build commands and flags
|
||||
<linux26 linux_26>
|
||||
@ -299,7 +300,7 @@ ${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: ${LINUX_LIBAFS_NAME}.ko
|
||||
.FORCE:
|
||||
${LINUX_LIBAFS_NAME}.ko afspag.ko: .FORCE
|
||||
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
|
||||
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
|
||||
env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_BUILD} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
|
||||
|
||||
<all -linux26 -linux_26 -umlinux26>
|
||||
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user