set ${SYS_NAME}/dest; $(MKDIR_IF_NEEDED)
$(MAKE) install "COMPILE_PART1=cd src; cd" "COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_PART3=; $(MAKE) test SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_CLEAN=; $(MAKE) clean SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" SYS_NAME=${SYS_NAME}
+all_nolibafs:
+ set ${SYS_NAME}/dest; $(MKDIR_IF_NEEDED)
+ $(MAKE) install TARGET=finale_nolibafs "COMPILE_PART1=cd src; cd" "COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_PART3=; $(MAKE) test SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_CLEAN=; $(MAKE) clean SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" SYS_NAME=${SYS_NAME}
+
+only_libafs:
+ set ${SYS_NAME}/dest; $(MKDIR_IF_NEEDED)
+ $(MAKE) install TARGET=libafs "COMPILE_PART1=cd src; cd" "COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_PART3=; $(MAKE) test SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_CLEAN=; $(MAKE) clean SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=@TOP_SRCDIR@ SRCDIR=`pwd`/${SYS_NAME}/dest/" SYS_NAME=${SYS_NAME}
+
project: cmd comerr
config:
libafsauthent libadmin
${COMPILE_PART1} finale ${COMPILE_PART2}
+finale_nolibafs: project cmd comerr afsd allrcmds butc tbutc libuafs audit kauth log package \
+ ptserver scout bu_utils ubik uss bozo vfsck volser \
+ venus update xstat afsmonitor dauth tests libafsrpc \
+ libafsauthent libadmin
+ ${COMPILE_PART1} finale ${COMPILE_PART2}
+
# Use washtool to ensure MakefileProto is current and obj/libafs exists.
libafs_setup: config export
AC_ARG_ENABLE(kernel-module,
[ --disable-kernel-module disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
)
+AC_ARG_ENABLE(redhat-buildsys,
+[ --enable-redhat-buildsys enable compilation of the redhat build system kernel (defaults to disabled)],, enable_redhat_buildsys="no"
+)
AC_PROG_CC
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 -1`
if test "x$linux_kvers" = "x"; then
- AC_MSG_ERROR(Linux headers lack version definition)
- exit 1
+ 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 -1`
+ if test "x$linux_kvers" = "x"; then
+
+ AC_MSG_ERROR(Linux headers lack version definition [2])
+ exit 1
+ else
+ LINUX_VERSION="$linux_kvers"
+ fi
+ else
+ AC_MSG_ERROR(Linux headers lack version definition)
+ exit 1
+ fi
else
LINUX_VERSION="$linux_kvers"
fi
AC_DEFUN(LINUX_NEED_RHCONFIG,[
-AC_MSG_CHECKING(for redhat kernel configuration)
-if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then
+if test "x$enable_redhat_buildsys" = "xyes"; then
+ RHCONFIG_SP=""
+ RHCONFIG_MP=""
+else
+ AC_MSG_CHECKING(for redhat kernel configuration)
+ if test -f "${LINUX_KERNEL_PATH}/include/linux/rhconfig.h"; then
ac_linux_rhconfig=yes
- RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0"
- RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1"
+ RHCONFIG_SP="-D__BOOT_KERNEL_UP=1 -D__BOOT_KERNEL_SMP=0 -U__SMP__"
+ RHCONFIG_MP="-D__BOOT_KERNEL_UP=0 -D__BOOT_KERNEL_SMP=1 -D__SMP__"
AC_MSG_RESULT($ac_linux_rhconfig)
if test ! -f "/boot/kernel.h"; then
AC_MSG_WARN([/boot/kernel.h does not exist. build may fail])
fi
-else
+ else
ac_linux_rhconfig=no
- RHCONFIG_SP=""
- RHCONFIG_MP=""
+ RHCONFIG_SP="-U__SMP__"
+ RHCONFIG_MP="-D__SMP__"
AC_MSG_RESULT($ac_linux_rhconfig)
+ fi
fi
AC_SUBST(RHCONFIG_SP)
AC_SUBST(RHCONFIG_MP)
])
AC_DEFUN(LINUX_WHICH_MODULES,[
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
-AC_MSG_CHECKING(if kernel uses MODVERSIONS)
-AC_CACHE_VAL(ac_cv_linux_config_modversions,[
-AC_TRY_COMPILE(
+if test "x$enable_redhat_buildsys" = "xyes"; then
+ MPS=Default
+else
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $RHCONFIG_SP $CPPFLAGS"
+ AC_MSG_CHECKING(if kernel uses MODVERSIONS)
+ AC_CACHE_VAL(ac_cv_linux_config_modversions,[
+ AC_TRY_COMPILE(
[#include <linux/config.h>
],
[#ifndef CONFIG_MODVERSIONS
lose;
#endif
],
-ac_cv_linux_config_modversions=yes,
-ac_cv_linux_config_modversions=no)])
-AC_MSG_RESULT($ac_cv_linux_config_modversions)
-AC_MSG_CHECKING(which kernel modules to build)
-if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
- MPS="MP SP"
-else
-AC_CACHE_VAL(ac_cv_linux_config_smp, [
-AC_TRY_COMPILE(
+ ac_cv_linux_config_modversions=yes,
+ ac_cv_linux_config_modversions=no)])
+ AC_MSG_RESULT($ac_cv_linux_config_modversions)
+ AC_MSG_CHECKING(which kernel modules to build)
+ if test "x$ac_linux_rhconfig" = "xyes" -o "x$ac_cv_linux_config_modversions" = "xno"; then
+ MPS="MP SP"
+ else
+ AC_CACHE_VAL(ac_cv_linux_config_smp, [
+ AC_TRY_COMPILE(
[#include <linux/config.h>
],
[#ifndef CONFIG_SMP
lose;
#endif
],
-ac_cv_linux_config_smp=yes,
-ac_cv_linux_config_smp=no)])
-dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
- if test "x$ac_cv_linux_config_smp" = "xyes"; then
- MPS=MP
- else
- MPS=SP
- fi
+ ac_cv_linux_config_smp=yes,
+ ac_cv_linux_config_smp=no)])
+ dnl AC_MSG_RESULT($ac_cv_linux_config_smp)
+ if test "x$ac_cv_linux_config_smp" = "xyes"; then
+ MPS=MP
+ else
+ MPS=SP
+ fi
+ fi
+ CPPFLAGS=$save_CPPFLAGS
+ AC_MSG_RESULT($MPS)
fi
-AC_MSG_RESULT($MPS)
AC_SUBST(MPS)
-CPPFLAGS=$save_CPPFLAGS])
+])
LINUX_VERS=@LINUX_VERSION@
LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
+LINUX_MODULE_NAME=
+LOCAL_SMP_DEF=
setup:
-rm -f h net netinet sys rpc
-ln -s rx rpc
for m in ${MPS} ; do \
- KDIR=$(KOBJ)-${LINUX_VERS}-$$m; \
+ KDIR=$(KOBJ)-${LINUX_VERS}${LINUX_MODULE_NAME}-$$m; \
mkdir -p $${KDIR}; \
ln -fs ../Makefile $${KDIR}/Makefile ; \
ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
ln -s ${LINUX_KERNEL_PATH}/include/asm-sparc64 asm
<all>
for m in ${MPS} ; do \
- KDIR=${KOBJ}-${LINUX_VERS}-$$m ; \
+ KDIR=${KOBJ}-${LINUX_VERS}${LINUX_MODULE_NAME}-$$m ; \
echo Building in directory: $${KDIR} ; \
if [ "$$m" = "MP" ] ; then \
- SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ -D__SMP__" ; \
+ SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ ${LOCAL_SMP_DEF}" ; \
TARG="libafs.mp" ; \
else \
- SMP_DEF="@RHCONFIG_SP@ -U__SMP__" ; \
+ SMP_DEF="@RHCONFIG_SP@ ${LOCAL_SMP_DEF}" ; \
TARG=libafs ; \
fi ; \
cd $${KDIR} ; \
- $(MAKE) DESTDIR=${DESTDIR} SMP_DEF="$${SMP_DEF}" $${TARG} CLIENT=${LINUX_VERS} || exit $$?; \
+ $(MAKE) DESTDIR=${DESTDIR} SMP_DEF="$${SMP_DEF}" $${TARG} CLIENT=${LINUX_VERS}${LINUX_MODULE_NAME} || exit $$?; \
cd ../ ; \
done