submount-20040731
[openafs.git] / Makefile.in
index c4389cc..675d4f8 100644 (file)
@@ -4,6 +4,8 @@
 # This software has been released under the terms of the IBM Public
 # License.  For details, see the LICENSE file in the top-level source
 # directory or online at http://www.openafs.org/dl/license10.html
+#
+# Portions Copyright (c) 2003 Apple Computer, Inc.
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
@@ -59,6 +61,22 @@ dest_nolibafs: all_nolibafs dest_dirs
 dest_only_libafs: only_libafs dest_dirs
        $(MAKE) build TARGET=libafs COMPILE_PART2B=dest
 
+packages: dest
+       @case ${SYS_NAME} in \
+       *_darwin_* ) \
+               ${COMPILE_PART1} packaging/MacOS && sh ./buildpkg.sh ${DEST} ;; \
+       hp_ux110 ) \
+               ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.00 ;; \
+       hp_ux11i ) \
+               ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.11 ;; \
+       ia64_hpux1122 ) \
+               ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.22 ;; \
+       ia64_hpux1123 ) \
+               ${COMPILE_PART1} packaging/HP-UX && swpackage -s  psf-1.2.10-transarc-paths-11.23 ;; \
+       *) \
+               echo Not building packages for ${SYS_NAME} ;; \
+       esac
+
 ${TOP_INCDIR} ${TOP_INCDIR}/afs ${TOP_LIBDIR} ${TOP_JLIBDIR}:
        mkdir -p $@
 
@@ -109,7 +127,7 @@ comerr: util
 
 cmd: comerr
        @case ${SYS_NAME} in \
-       sgi_6* | sun*_5[789] | hp_ux11* | sparc64_linux* | alpha_linux* ) \
+       sgi_6* | sun*_5[789] | hp_ux11* | ia64_hpux* | sparc64_linux* | alpha_linux* ) \
                ${COMPILE_PART1} cmd ${COMPILE_PART2}64 ;; \
        *) \
                ${COMPILE_PART1} cmd ${COMPILE_PART2} ;; \
@@ -201,8 +219,12 @@ viced: cmd comerr vlserver audit
 
 tviced: cmd comerr viced vlserver libafsrpc libafsauthent
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
+       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
                ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \
+       *_darwin_[1-6][0-9]) \
+               echo Not building MT viced for ${SYS_NAME} ;; \
+       *_darwin_*) \
+               ${COMPILE_PART1} tviced  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT viced for ${SYS_NAME} ;; \
        esac
@@ -210,6 +232,18 @@ tviced: cmd comerr viced vlserver libafsrpc libafsauthent
 volser: cmd comerr tviced usd kauth audit
        ${COMPILE_PART1} volser ${COMPILE_PART2}
 
+tvolser: project tviced usd libafsrpc libafsauthent
+       case ${SYS_NAME} in                                             \
+       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*)   \
+               ${COMPILE_PART1} tvolser  ${COMPILE_PART2} ;;           \
+       *_darwin_[1-6][0-9])                                            \
+               echo Not building MT volser for ${SYS_NAME} ;;          \
+       *_darwin_*)                                                     \
+               ${COMPILE_PART1} tvolser ${COMPILE_PART2} ;;            \
+       *)                                                              \
+               echo Not building MT volser for ${SYS_NAME} ;;          \
+       esac
+
 venus: cmd comerr volser ptserver
        ${COMPILE_PART1} venus ${COMPILE_PART2}
        ${COMPILE_PART1} venus/test ${COMPILE_PART2}
@@ -223,7 +257,7 @@ null: cmd comerr
 ${TOP_LIBDIR}/libtermlib.a: 
        $(RM) -f ${TOP_LIBDIR}/libtermlib.a
        case ${SYS_NAME} in \
-       rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | ppc_darwin* | *fbsd*) \
+       rs_aix* | sun4x_* | sunx86_* | sgi_6? | *linux* | *_darwin* | *fbsd* | ia64_hpux*) \
                ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a ;; \
        *) \
                ln -s /usr/lib/libtermlib.a ${TOP_LIBDIR}/libtermlib.a ;; \
@@ -247,33 +281,54 @@ bozo: cmd comerr ntp audit
 vfsck: vol
        set -x; \
        case ${SYS_NAME} in \
-       sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \
+       sgi_* | *linux* | rs_aix42 | *_darwin* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | *_nbsd* | sun*_4* | rs_aix5* ) \
                echo skip vfsck for ${SYS_NAME} ;; \
         * ) \
                ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \
        esac
 
-login: cmd comerr kauth rxkad
+pam: cmd comerr kauth rxkad
+       set -x; \
+       if test "@HAVE_PAM@" = "yes"; then \
+               ${COMPILE_PART1} pam ${COMPILE_PART2} ; \
+       else \
+               echo Skipping pam for ${SYS_NAME} ; \
+       fi
+
+tsm41: cmd comerr kauth rxkad
        set -x; \
        case ${SYS_NAME} in \
-       sgi_* ) \
-               ${COMPILE_PART1} sgistuff ${COMPILE_PART2} ;; \
-       rs_aix42 | rs_aix51 ) \
+       rs_aix* ) \
                ${COMPILE_PART1} tsm41 ${COMPILE_PART2} ;; \
+       * ) \
+               echo Skipping tsm41 for ${SYS_NAME} ;; \
+       esac
+
+sia: cmd comerr kauth rxkad
+       set -x; \
+       case ${SYS_NAME} in \
        alpha_dux* ) \
                ${COMPILE_PART1} sia ${COMPILE_PART2} ;; \
-       sun4x_55 ) \
-               ${COMPILE_PART1} login ${COMPILE_PART2} ;; \
-       parisc_linux24) \
-               echo Skipping pam/login for parisc_linux24 ;; \
-       sun4x_* | sunx86_* | hp_ux11* | *linux* | *fbsd* ) \
-               ${COMPILE_PART1} pam ${COMPILE_PART2} ;; \
-       ppc_darwin* | *_obsd* | *_nbsd* | hp_ux* | rs_aix5* ) \
-               echo Skipping login for ${SYS_NAME} ;; \
        * ) \
-               ${COMPILE_PART1} login ${COMPILE_PART2} ;; \
+               echo Skipping sia for ${SYS_NAME} ;; \
+       esac
+
+sgistuff: cmd comerr kauth rxkad
+       set -x; \
+       case ${SYS_NAME} in \
+       sgi_* ) \
+               ${COMPILE_PART1} sgistuff ${COMPILE_PART2} ;; \
+       * ) \
+               echo Skipping sgistuff for ${SYS_NAME} ;; \
        esac
 
+login: cmd comerr kauth rxkad pam sia tsm41 sgistuff
+       set -x; \
+       if test "@BUILD_LOGIN@" = "yes"; then \
+               ${COMPILE_PART1} login ${COMPILE_PART2} ; \
+       else \
+               echo Skipping login for ${SYS_NAME} ; \
+       fi
 
 #
 # _depinstall targets - only build and install headers/sources that are needed by libafs/libuafs
@@ -356,7 +411,7 @@ libuafs: libuafs_setup vlserver_depinstall rx_depinstall fsint_depinstall \
                rxstat_depinstall lwp_depinstall des
        set -x; \
        case ${SYS_NAME} in \
-       hp_ux102* | *_obsd* | sun*_4* | *_nbsd*) \
+       hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | ia64_hpux112*) \
                echo Skipping libuafs for ${SYS_NAME} ;; \
        * ) \
                ${COMPILE_PART1} libuafs ${COMPILE_PART2} ;; \
@@ -388,7 +443,7 @@ butc: cmd comerr bubasics butm budb bucoord cmd rxgen rx
 
 tbutc: cmd comerr bubasics butm budb bucoord cmd butc
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix4*|*linux*|hp_ux110) \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
                ${COMPILE_PART1} tbutc ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT butc for ${SYS_NAME} ;; \
@@ -411,24 +466,34 @@ tests: rxtests ubiktests
 # pthread based user space RX library
 libafsrpc: rx rxkad des
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
        ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \
+       *_darwin_[1-6][0-9]) \
+               echo Not building MT libafsrpc for ${SYS_NAME} ;; \
+       *_darwin_*) \
+               ${COMPILE_PART1} libafsrpc  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT libafsrpc for ${SYS_NAME} ;; \
        esac
 
 libafsauthent: ubik auth kauth libafsrpc
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110|*fbsd*) \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*|*nbsd2*) \
        ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \
+       *_darwin_[1-6][0-9]) \
+               echo Not building MT libafsauthent for ${SYS_NAME} ;; \
+       *_darwin_*) \
+               ${COMPILE_PART1} libafsauthent  ${COMPILE_PART2} ;; \
        *) \
-               echo Not building MT libafsrpc for ${SYS_NAME} ;; \
+               echo Not building MT libafsauthent for ${SYS_NAME} ;; \
        esac
 
 # pthread based user space RX library
 shlibafsrpc: rx rxkad des
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110) \
+       amd64_linux24) \
+               echo Skipping shlibafsrpc for amd64_linux24 ;; \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
        ${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
        *) \
                echo Not building shared libafsrpc for ${SYS_NAME} ;; \
@@ -436,10 +501,12 @@ shlibafsrpc: rx rxkad des
 
 shlibafsauthent: ubik auth kauth shlibafsrpc
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110) \
+       amd64_linux24) \
+               echo Skipping shlibafsauthent for amd64_linux24 ;; \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
        ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
        *) \
-               echo Not building shared libafsrpc for ${SYS_NAME} ;; \
+               echo Not building shared libafsauthent for ${SYS_NAME} ;; \
        esac
 
 libadmin_real: 
@@ -456,7 +523,11 @@ libadmin_real:
 
 libadmin: libafsauthent bozo
        case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux110) \
+       alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
+                       $(MAKE) libadmin_real ;; \
+       *_darwin_[1-6][0-9]) \
+               echo Not building MT libadmin for ${SYS_NAME} ;; \
+       *_darwin_*) \
                        $(MAKE) libadmin_real ;; \
        *) \
                echo Not building MT libadmin for ${SYS_NAME} ;; \
@@ -597,6 +668,7 @@ clean2:
        -${COMPILE_PART1} rcp ${COMPILE_CLEAN}
        -${COMPILE_PART1} libafs ${COMPILE_CLEAN}
        -${COMPILE_PART1} libuafs ${COMPILE_CLEAN}
+       -${COMPILE_PART1} tests ${COMPILE_CLEAN}
        -(cd src/libafs; /bin/rm -rf afs afsint config rx)
        -(cd src/libuafs; /bin/rm -rf afs afsint config rx des)
        -/bin/rm -rf ${TOP_INCDIR} ${TOP_LIBDIR} ${TOP_JLIBDIR}
@@ -604,6 +676,7 @@ clean2:
 
  
 distclean: clean
+       /bin/rm -rf lib include
        /bin/rm -f config.log config.cache config.status \
        src/config/afsconfig.h \
        Makefile \
@@ -725,11 +798,14 @@ distclean: clean
        src/vol/test/Makefile \
        src/volser/Makefile \
        src/wsadmin.src/Makefile \
-       src/xstat/Makefile 
+       src/xstat/Makefile  \
+       src/helper-splint.sh
 
 pristine: distclean
        /bin/rm -f src/config/afsconfig.h.in configure configure-libafs aclocal.m4
 
+maintainer-clean: pristine
+
 #
 # Below targets are all deprecated, insecure, or obsolte, 
 # see README.OBSOLETE and README.INSECURE for more info
@@ -756,7 +832,7 @@ package.files: package
 ntp: project volser
        @case ${WITH_OBSOLETE} in \
        YES)    case ${SYS_NAME} in \
-               sun4x_58 | sunx86_* | *linux* | *fbsd* | ppc_darwin* ) echo skipping ntp for ${SYS_NAME} ;; \
+               sun4x_58 | sunx86_* | *linux* | *fbsd* | *_darwin* | *nbsd*) echo skipping ntp for ${SYS_NAME} ;; \
                * ) ${COMPILE_PART1} ntp ${COMPILE_PART2} ;; \
                esac ;; \
        *)      echo skipping deprecated target: ntp ;; \