Make --enable-pthreaded-ubik do what it claims
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 15 Jul 2011 16:14:27 +0000 (17:14 +0100)
committerDerrick Brashear <shadow@dementia.org>
Fri, 15 Jul 2011 19:28:26 +0000 (12:28 -0700)
The configure help text for --enable-pthreded-ubik says
    "enable installation of pthreaded ubik applications"

This patch set makes the behaviour in the code match that. Instead
of controlling whether the pthreaded ubik code is compiled at all,
the configure option now just controls whether it is installed. This
means that we'll always build the pthread code, and so should reduce
the number of times it is inadvertently broken.

Change-Id: I8b2ffb46e01157f2043cf7daf68e69580ea285c5
Reviewed-on: http://gerrit.openafs.org/5028
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

Makefile.in
src/tbudb/Makefile.in
src/tubik/Makefile.in
src/tvolser/Makefile.in

index 0439f36..295ad55 100644 (file)
@@ -11,7 +11,6 @@ srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
 
 ENABLE_KERNEL_MODULE=@ENABLE_KERNEL_MODULE@
-ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
 
 # To compile AFS from scratch in the src tree run "make".
 #   This recursively calls "make install ..." and does not depend on the
@@ -221,13 +220,9 @@ ubik: cmd comerr auth ubik_depinstall sys
        +${COMPILE_PART1} ubik ${COMPILE_PART2}
 
 tubik: ubik libafsrpc libafsauthent
-       +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
+       +case ${SYS_NAME} in \
+       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
                ${COMPILE_PART1} tubik ${COMPILE_PART2} ;; \
-       *_darwin_[1-6][0-9]) \
-               echo Not building MT ubik for ${SYS_NAME} ;; \
-       *_darwin_*) \
-               ${COMPILE_PART1} tubik  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT ubik for ${SYS_NAME} ;; \
        esac
@@ -238,13 +233,9 @@ ptserver: cmd comerr ubik cmd comerr auth audit ptserver_depinstall
        +${COMPILE_PART1} ptserver ${COMPILE_PART2}
 
 tptserver: cmd comerr ptserver tubik libafsrpc libafsauthent
-       +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
+       +case ${SYS_NAME} in \
+       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
                ${COMPILE_PART1} tptserver ${COMPILE_PART2} ;; \
-       *_darwin_[1-6][0-9]) \
-               echo Not building MT ptserver for ${SYS_NAME} ;; \
-       *_darwin_*) \
-               ${COMPILE_PART1} tptserver  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT ptserver for ${SYS_NAME} ;; \
        esac
@@ -286,13 +277,9 @@ vlserver: cmd comerr vol audit vlserver_depinstall
        +${COMPILE_PART1} vlserver ${COMPILE_PART2}
 
 tvlserver: cmd comerr vol audit tubik libafsrpc libafsauthent tvlserver_depinstall
-       +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
+       +case ${SYS_NAME} in \
        alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
                ${COMPILE_PART1} tvlserver ${COMPILE_PART2} ;; \
-       *_darwin_[1-6][0-9]) \
-               echo Not building MT tvlserver for ${SYS_NAME} ;; \
-       *_darwin_*) \
-               ${COMPILE_PART1} tvlserver  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT tvlserver for ${SYS_NAME} ;; \
        esac
@@ -323,10 +310,7 @@ volser: cmd comerr tviced usd kauth audit
 tvolser: project tviced usd libafsrpc libafsauthent volser
        +@case ${SYS_NAME} in                                           \
        *_darwin_*|alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*obsd*)   \
-               ${COMPILE_PART1} tvolser ${COMPILE_PART2} &&            \
-               if [ "xyes" = "x$(ENABLE_PTHREADED_UNIK)" ] ; then      \
-                       $(MAKE) $(COMPILE_PART2B)_vos;                                          \
-               fi;;                                                    \
+               ${COMPILE_PART1} tvolser ${COMPILE_PART2} ;;            \
        *)                                                              \
                echo Not building MT volser for ${SYS_NAME} ;;          \
        esac
@@ -556,13 +540,9 @@ budb: cmd comerr bubasics uss
        +${COMPILE_PART1} budb ${COMPILE_PART2}
 
 tbudb: budb
-       +[ yes != "$(ENABLE_PTHREADED_UBIK)" ] || case ${SYS_NAME} in \
-       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*) \
+       +case ${SYS_NAME} in \
+       alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*[nof]bsd*|*_darwin_*) \
                ${COMPILE_PART1} tbudb ${COMPILE_PART2} ;; \
-       *_darwin_[1-6][0-9]) \
-               echo Not building MT budb for ${SYS_NAME} ;; \
-       *_darwin_*) \
-               ${COMPILE_PART1} tbudb  ${COMPILE_PART2} ;; \
        *) \
                echo Not building MT budb for ${SYS_NAME} ;; \
        esac
index 7ba4611..27b1f8a 100644 (file)
@@ -169,10 +169,16 @@ libbudb.a: budb_errs.o budb.cs.o budb.xdr.o struct_ops.o AFS_component_version_n
 # Install targets
 #
 install: budb_server
-       ${INSTALl_PROGRAM} budb_server ${DESTDIR}${afssrvlibexecdir}/buserver
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then      \
+           ${INSTALl_PROGRAM} budb_server                      \
+               ${DESTDIR}${afssrvlibexecdir}/buserver;         \
+       fi
 
 dest: budb_server
-       ${INSTALL_PROGRAM} budb_server ${DEST}/root.server/usr/afs/bin/buserver
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then      \
+           ${INSTALL_PROGRAM} budb_server                      \
+               ${DEST}/root.server/usr/afs/bin/buserver        \
+       fi
 
 #
 # Misc targets
index 3b06b89..b4ca2cf 100644 (file)
@@ -10,6 +10,7 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.pthread
 
 HELPER_SPLINT=@HELPER_SPLINT@
+ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
 
 UBIK=$(srcdir)/../ubik
 RX=$(srcdir)/../rx
@@ -209,22 +210,25 @@ install: libubik_pthread.a ubik.h ubik_int.h udebug
        ${INSTALL} -d ${DESTDIR}${includedir}
        ${INSTALL} -d ${DESTDIR}${bindir}
        ${INSTALL} -d ${DESTDIR}${afssrvbindir}
-       ${INSTALL_PROGRAM} udebug ${DESTDIR}${bindir}/udebug
-       ${INSTALL_PROGRAM} udebug ${DESTDIR}${afssrvbindir}/udebug
        ${INSTALL_DATA} libubik_pthread.a ${DESTDIR}${libdir}/libubik_pthread.a
-       ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h
-       ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                 \
+           ${INSTALL_PROGRAM} udebug ${DESTDIR}${bindir}/udebug;          \
+           ${INSTALL_PROGRAM} udebug ${DESTDIR}${afssrvbindir}/udebug;    \
+           ${INSTALL_DATA} ubik.h ${DESTDIR}${includedir}/ubik.h;         \
+           ${INSTALL_DATA} ubik_int.h ${DESTDIR}${includedir}/ubik_int.h; \
+       fi
 
 dest: libubik_pthread.a ubik.h ubik_int.h udebug
        ${INSTALL} -d ${DEST}/lib
        ${INSTALL} -d ${DEST}/include
        ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
-       ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug
-       ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug
        ${INSTALL_DATA} libubik_pthread.a ${DEST}/lib/libubik_pthread.a
-       ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h
-       ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h
-
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then                    \
+           ${INSTALL_PROGRAM} udebug ${DEST}/bin/udebug;                     \
+           ${INSTALL_PROGRAM} udebug ${DEST}/root.server/usr/afs/bin/udebug; \
+           ${INSTALL_DATA} ubik.h ${DEST}/include/ubik.h;                    \
+           ${INSTALL_DATA} ubik_int.h ${DEST}/include/ubik_int.h;            \
+       fi
 #
 # Misc. targets
 #
index 0788f6a..7c57bc7 100644 (file)
@@ -10,6 +10,7 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 include @TOP_OBJDIR@/src/config/Makefile.pthread
 
 HELPER_SPLINT=@HELPER_SPLINT@
+ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
 
 MODULE_CFLAGS=-DRXDEBUG -DFSSYNC_BUILD_CLIENT
 
@@ -54,9 +55,7 @@ LIBS= ${TOP_LIBDIR}/libcmd.a          \
        ${TOP_LIBDIR}/libusd.a          \
        ${TOP_LIBDIR}/libafsrpc.a
 
-all: volserver 
-
-all_vos: vos
+all: volserver vos
 
 CFLAGS_rx_pthread.o = -DDPF_FSLOG
 rx_pthread.o: ${RX}/rx_pthread.c
@@ -222,18 +221,18 @@ volserver: ${objects} ${LIBS}
 install: volserver
        ${INSTALL} -d ${DESTDIR}${afssrvlibexecdir}
        ${INSTALL} volserver ${DESTDIR}${afssrvlibexecdir}/volserver
-
-install_vos: vos
-       ${INSTALL} vos ${DESTDIR}${afssrvsbindir}/vos
-       ${INSTALL} vos ${DESTDIR}${sbindir}/vos
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then     \
+           ${INSTALL} vos ${DESTDIR}${afssrvsbindir}/vos      \
+           ${INSTALL} vos ${DESTDIR}${sbindir}/vos            \
+       fi
 
 dest: volserver
        ${INSTALL} -d ${DEST}/root.server/usr/afs/bin
        ${INSTALL} volserver ${DEST}/root.server/usr/afs/bin/volserver
-
-dest_vos: vos
-       ${INSTALL} vos ${DEST}/root.server/usr/afs/bin/vos
-       ${INSTALL} vos ${DEST}/etc/vos
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+           ${INSTALL} vos ${DEST}/root.server/usr/afs/bin/vos \
+           ${INSTALL} vos ${DEST}/etc/vos \
+       fi
 
 clean:
        $(RM) -f *.o volserver core AFS_component_version_number.c