[PVFS2-CVS]
commit by pw in pvfs2: ChangeLog Makefile.in configure.in configure
CVS commit program
cvs at parl.clemson.edu
Wed Mar 10 15:34:59 EST 2004
Update of /projects/cvsroot/pvfs2
In directory parlweb:/tmp/cvs-serv32003
Modified Files:
ChangeLog Makefile.in configure.in configure
Log Message:
- Kernel module builds:
- build the module with everything else, if configured
- clean up properly
- work out-of-tree
Index: ChangeLog
===================================================================
RCS file: /projects/cvsroot/pvfs2/ChangeLog,v
diff -u -p -u -r1.67 -r1.68
--- ChangeLog 7 Mar 2004 02:18:51 -0000 1.67
+++ ChangeLog 10 Mar 2004 20:34:59 -0000 1.68
@@ -12,6 +12,10 @@ pvfs2-0.1.2pre1
- simplify state machine
- add shared and static libraries build options
- honor PVFS2_DEBUGFILE environment variable in client
+- Kernel module builds:
+ - build the module with everything else, if configured
+ - clean up properly
+ - work out-of-tree
pvfs2-0.1.1
Index: Makefile.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/Makefile.in,v
diff -u -p -u -r1.138 -r1.139
--- Makefile.in 7 Mar 2004 02:18:49 -0000 1.138
+++ Makefile.in 10 Mar 2004 20:34:59 -0000 1.139
@@ -458,6 +458,17 @@ ifdef BUILD_VIS
all: vis
endif
+# build linux-2.6 kernel module if requested
+LINUX_KERNEL_SRC = @LINUX_KERNEL_SRC@
+ifneq (,$(LINUX_KERNEL_SRC))
+all: kernel
+endif
+
+# Can't use the actual file target since we don't know how to figure out
+# dependencies---only the kernel source tree can do that.
+.PHONY: kernel
+kernel:
+ @$(MAKE) --no-print-directory -C src/kernel/linux-2.6
# target for building MPI-IO test programs
mpiiotests: $(MPIIOTESTS)
@@ -726,7 +737,7 @@ docsclean:
rm -f $(DOCSPS) $(DOCSPDF) $(DOCSCRUFT)
# top rule for cleaning up tree
-clean:
+clean::
ifdef QUIET_COMPILE
@echo " CLEAN"
@rm -f $(LIBOBJS) $(TESTOBJS) $(SERVEROBJS) $(MISCOBJS) $(TESTS)\
@@ -748,6 +759,11 @@ else
$(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS) \
src/server/pvfs2-server-server.o $(MPIIOTESTS) \
src/apps/karma/karma
+endif
+
+ifneq (,$(LINUX_KERNEL_SRC))
+clean::
+ @$(MAKE) --no-print-directory -C src/kernel/linux-2.6 clean
endif
# builds a tarball of the source tree suitable for distribution
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure.in,v
diff -u -p -u -r1.142 -r1.143
--- configure.in 7 Mar 2004 02:18:49 -0000 1.142
+++ configure.in 10 Mar 2004 20:34:59 -0000 1.143
@@ -125,15 +125,42 @@ AC_ARG_WITH(mpe,
dnl
dnl Enables the kernel module to build if the appropriate
dnl linux-2.6.x path is specified
+dnl Make sure this is a usable kernel source tree too.
dnl
AC_ARG_WITH(kernel,
-[ --with-kernel=src_path Build pvfs2 kernel module against specified src (2.6.x only).], LINUX_KERNEL_SRC="$withval",LINUX_KERNEL_SRC="")
+[ --with-kernel=src_path Build pvfs2 kernel module against specified src (2.6.x only).],
+ if test x$withval = xyes -o x$withval = x ; then
+ AC_MSG_ERROR(--with-kernel must be given the path to your kernel source.)
+ fi
+ if ! test -d $withval ; then
+ AC_MSG_ERROR(The --with-kernel path $withval is not a directory.)
+ fi
+ if ! test -r $withval/include/linux/version.h ; then
+ AC_MSG_ERROR(The kernel source tree must have been configured.)
+ fi
+ vers=`sed -n '/UTS_RELEASE/{; s/.*"\([0-9]\.[0-9]\).*".*/\1/; p; }' $withval/include/linux/version.h`
+ if ! grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then
+ AC_MSG_ERROR(The kernel source tree does not appear to be 2.6)
+ fi
+ # At least up through 2.6.3 need to write .__modpost.cmd; this might get
+ # fixed in the future.
+ if ! test -w $withval ; then
+ AC_MSG_ERROR(You must have write permissions to the kernel source tree.)
+ fi
+ LINUX_KERNEL_SRC="$withval"
+ , LINUX_KERNEL_SRC="")
+
+dnl PAV configuration needs absolute location of source and build.
+dnl Linux-2.6 module needs absolute location of source, and uses the
+dnl relative location for soft links for out-of-tree builds.
+BUILD_ABSOLUTE_TOP=`pwd`
+SRC_RELATIVE_TOP=$srcdir
+SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd`
-BUILD_TOP_LEVEL=`pwd`
-SRC_TOP_LEVEL=$srcdir
-AC_SUBST(SRC_TOP_LEVEL)
-AC_SUBST(BUILD_TOP_LEVEL)
AC_SUBST(LINUX_KERNEL_SRC)
+AC_SUBST(BUILD_ABSOLUTE_TOP)
+AC_SUBST(SRC_RELATIVE_TOP)
+AC_SUBST(SRC_ABSOLUTE_TOP)
dnl More options
AC_ARG_ENABLE(fast,
Index: configure
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure,v
diff -u -p -u -r1.141 -r1.142
--- configure 7 Mar 2004 02:18:49 -0000 1.141
+++ configure 10 Mar 2004 20:34:59 -0000 1.142
@@ -308,7 +308,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE PVFS2_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os MISC_TROVE_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SRC_TOP_LEVEL BUILD_TOP_LEVEL LINUX_KERNEL_SRC ENABLE_COVERAGE QUIET_COMPILE HAVE_PKGCONFIG GTKLIBS GTKCFLAGS BUILD_KARMA build_shared build_static HAVE_PERL HAVE_FIND HAVE_BISON HAVE_FLEX INTELC GNUC GM_HOME BUILD_GM IB_HOME BUILD_IB MPICC BUILD_MPI MPI_INTELC MPI_GNUC BUILD_VIS VISCFLAGS VISLIBS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE PVFS2_VERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os MISC_TROVE_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP LINUX_KERNEL_SRC BUILD_ABSOLUTE_TOP SRC_RELATIVE_TOP SRC_ABSOLUTE_TOP ENABLE_COVERAGE QUIET_COMPILE HAVE_PKGCONFIG GTKLIBS GTKCFLAGS BUILD_KARMA build_shared build_static HAVE_PERL HAVE_FIND HAVE_BISON HAVE_FLEX INTELC GNUC GM_HOME BUILD_GM IB_HOME BUILD_IB MPICC BUILD_MPI MPI_INTELC MPI_GNUC BUILD_VIS VISCFLAGS VISLIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -3679,13 +3679,45 @@ fi;
# Check whether --with-kernel or --without-kernel was given.
if test "${with_kernel+set}" = set; then
withval="$with_kernel"
- LINUX_KERNEL_SRC="$withval"
+ if test x$withval = xyes -o x$withval = x ; then
+ { { echo "$as_me:$LINENO: error: --with-kernel must be given the path to your kernel source." >&5
+echo "$as_me: error: --with-kernel must be given the path to your kernel source." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if ! test -d $withval ; then
+ { { echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5
+echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if ! test -r $withval/include/linux/version.h ; then
+ { { echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5
+echo "$as_me: error: The kernel source tree must have been configured." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h`
+ if ! grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then
+ { { echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.6" >&5
+echo "$as_me: error: The kernel source tree does not appear to be 2.6" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ # At least up through 2.6.3 need to write .__modpost.cmd; this might get
+ # fixed in the future.
+ if ! test -w $withval ; then
+ { { echo "$as_me:$LINENO: error: You must have write permissions to the kernel source tree." >&5
+echo "$as_me: error: You must have write permissions to the kernel source tree." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ LINUX_KERNEL_SRC="$withval"
+
else
LINUX_KERNEL_SRC=""
fi;
-BUILD_TOP_LEVEL=`pwd`
-SRC_TOP_LEVEL=$srcdir
+BUILD_ABSOLUTE_TOP=`pwd`
+SRC_RELATIVE_TOP=$srcdir
+SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd`
+
+
@@ -7892,9 +7924,10 @@ s, at EXEEXT@,$EXEEXT,;t t
s, at OBJEXT@,$OBJEXT,;t t
s, at CPP@,$CPP,;t t
s, at EGREP@,$EGREP,;t t
-s, at SRC_TOP_LEVEL@,$SRC_TOP_LEVEL,;t t
-s, at BUILD_TOP_LEVEL@,$BUILD_TOP_LEVEL,;t t
s, at LINUX_KERNEL_SRC@,$LINUX_KERNEL_SRC,;t t
+s, at BUILD_ABSOLUTE_TOP@,$BUILD_ABSOLUTE_TOP,;t t
+s, at SRC_RELATIVE_TOP@,$SRC_RELATIVE_TOP,;t t
+s, at SRC_ABSOLUTE_TOP@,$SRC_ABSOLUTE_TOP,;t t
s, at ENABLE_COVERAGE@,$ENABLE_COVERAGE,;t t
s, at QUIET_COMPILE@,$QUIET_COMPILE,;t t
s, at HAVE_PKGCONFIG@,$HAVE_PKGCONFIG,;t t
More information about the PVFS2-CVS
mailing list