Whamcloud - gitweb
add support for the snmp module.
authorjacob <jacob>
Thu, 14 Jul 2005 21:10:04 +0000 (21:10 +0000)
committerjacob <jacob>
Thu, 14 Jul 2005 21:10:04 +0000 (21:10 +0000)
build/autoMakefile.am.toplevel
build/autoconf/lustre-build.m4
build/autogen.sh
build/buildcvs
build/lustre.spec.in

index e42c725..5ecc7d1 100644 (file)
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS := . build @LIBSYSIO_SUBDIR@ portals lustre
-DIST_SUBDIRS := build libsysio portals lustre
+SUBDIRS := . build @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ portals lustre
+DIST_SUBDIRS := build @SNMP_DIST_SUBDIR@ libsysio portals lustre
 
 EXTRA_DIST := config.h.in
 
index 8d0db0a..b2a516b 100644 (file)
@@ -191,6 +191,16 @@ fi
 ])
 
 #
+# LB_PATH_SNMP
+#
+# check for in-tree snmp support
+#
+AC_DEFUN([LB_PATH_SNMP],
+[LB_CHECK_FILE([$srcdir/snmp/lustre-snmp.c],[SNMP_DIST_SUBDIR="snmp"])
+AC_SUBST(SNMP_DIST_SUBDIR)
+])
+
+#
 # LB_CONFIG_MODULES
 #
 # Build kernel modules?
@@ -444,6 +454,7 @@ LB_DARWIN_CONDITIONALS
 
 LP_CONDITIONALS
 LC_CONDITIONALS
+LS_CONDITIONALS
 ])
 
 #
@@ -462,6 +473,7 @@ LB_PROG_CC
 
 LB_PATH_LIBSYSIO
 LB_PATH_CRAY_PORTALS
+LB_PATH_SNMP
 
 LB_CONFIG_DOCS
 LB_CONFIG_UTILS
@@ -474,6 +486,9 @@ LC_CONFIG_LIBLUSTRE
 
 LP_CONFIGURE
 LC_CONFIGURE
+if test "$SNMP_DIST_SUBDIR" ; then
+       LS_CONFIGURE
+fi
 
 LB_CONDITIONALS
 LB_CONFIG_HEADERS
@@ -489,6 +504,9 @@ build/lustre.spec
 
 LP_CONFIG_FILES
 LC_CONFIG_FILES
+if test "$SNMP_DIST_SUBDIR" ; then
+       LS_CONFIG_FILES
+fi
 
 AC_SUBST(ac_configure_args)
 
index 05be061..b27e0f9 100644 (file)
@@ -78,6 +78,7 @@ check_version() {
 }
 
 echo "Checking for a complete tree..."
+# required directories
 for dir in build portals lustre ; do
     if [ ! -d "$dir" ] ; then
        cat >&2 <<EOF
@@ -88,6 +89,12 @@ EOF
     fi
     ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
 done
+# some are optional
+for dir in snmp ; do
+    if [ -d "$dir" ] ; then
+       ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $PWD/$dir/autoconf"
+    fi
+done
 
 check_version automake automake-1.7 "1.7.8"
 check_version autoconf autoconf "2.57"
index f2187dc..3013ff0 100644 (file)
@@ -2,7 +2,7 @@
 
 portalstag="HEAD"
 libsysiotag="HEAD"
-snmptag=""
+snmptag="HEAD"
 
 export LC_COLLATE=C
 
@@ -78,4 +78,5 @@ esac
 
 cvs_cmd libsysio libsysio "$libsysiotag"
 cvs_cmd portals portals "$portalstag"
+cvs_cmd snmp lustre-snmp "$snmptag"
 cvs_cmd lustre lustre-core "$lustretag"
index 33d4d46..6e56726 100644 (file)
@@ -126,11 +126,16 @@ cat >lustre.files <<EOF
 %attr(-, root, root) /usr/share/lustre/lustre2ldif.xsl
 %attr(-, root, root) /usr/share/lustre/top.ldif
 EOF
-if [ -f $RPM_BUILD_ROOT/usr/lib/liblustre.so ] ; then
+if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then
   echo '%attr(-, root, root) %{_libdir}/liblustre.a' >>lustre.files
   echo '%attr(-, root, root) %{_libdir}/liblustre.so' >>lustre.files
 fi
 
+if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre/snmp ] ; then
+  echo '%attr(-, root, root) %{_libdir}/lustre/snmp' >>lustre.files
+  echo '%attr(-, root, root) %{_datadir}/lustre/snmp/mibs' >>lustre.files
+fi
+
 %files -f lustre.files
 
 %files modules