This commit squashes two cherry-picks from master together, as the
first one broke the build with pthreaded ubik enabled.
The first commit:
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 21 00:29:33 2011 +0000
budb: Only have one build rule for budb_errs.c
budb had two build rules that could produce budb_errs.c, but only
one of them also produced budb_client.h. This led to problems with
parallel makes, as depending on which rule fired first, budb_client.h
might, or might not, exist.
Rework all of this so that it's cleaner. Instead of producing two
copies of the error table, just make budb_client.h a static file,
and include the dynamically generated budb_errs.h from it. This
reduces code duplication, and means that we have to run compile_et
one less time.
Reviewed-on: http://gerrit.openafs.org/4027
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
0d0b5048a5b68d4079b13609775f9234183d1947)
The second commit:
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Feb 21 13:49:59 2011 -0600
Fix budb build rules for tbudb and WINNT
Commit
0d0b5048a5b68d4079b13609775f9234183d1947 only fixed the budb
Makefile.in. Make the analagous changes to tbudb/Makefile.in and
NTMakefile.
Reviewed-on: http://gerrit.openafs.org/4029
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit
61453d8f33f6508f8464ffba0657aefb6c7eae3b)
Change-Id: I7d35c7557bcd82ba50742f2594bd4bb78cf0e5a5
Reviewed-on: http://gerrit.openafs.org/9405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
# to check that you haven't inadvertently ignored any tracked files.
/budb.h
-/budb_client.h
/budb_errs.c
/budb_errs.h
/budb_server
${TOP_INCDIR}/afs/cellconfig.h \
${TOP_INCDIR}/afs/com_err.h \
${TOP_INCDIR}/afs/bubasics.h \
+ ${TOP_INCDIR}/afs/budb_client.h \
+ ${TOP_INCDIR}/afs/budb_errs.h \
budb.h budb_client.h database.h
# library ordering defined by top level makefile
all: ${TOP_LIBDIR}/libbudb.a ${TOP_INCDIR}/afs/budb.h ${TOP_INCDIR}/afs/budb_errs.h ${TOP_INCDIR}/afs/budb_prototypes.h budb_server
generated: \
- budb_errs.c budb_errs.h budb_client.h \
+ budb_errs.c budb_errs.h \
budb.cs.c budb.ss.c budb.xdr.c budb.h
${TOP_LIBDIR}/libbudb.a: libbudb.a
${INSTALL_DATA} $? $@
${TOP_INCDIR}/afs/budb_errs.h: budb_errs.h
- ${INSTALL_DATA} $? $@
+ ${INSTALL_DATA} budb_errs.h $@
${TOP_INCDIR}/afs/budb_client.h: budb_client.h
${INSTALL_DATA} $? $@
${TOP_INCDIR}/afs/budb_prototypes.h: budb_prototypes.h
${INSTALL_DATA} $? $@
-#
-# budb_errs.o actually depends on neither budb_client.h nor budb_errs.h
-# but generating either of them will rebuild budb_errs.c
-#
-budb_errs.o: budb_errs.c budb_client.h budb_errs.h
-
-budb_client.h: budb_errs.c
-
-budb_errs.c: budb_errs.et budb_client.p.h
- $(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${srcdir} budb_errs -h budb_client
+budb_errs.h: budb_errs.c
-budb_errs.h: budb_errs.et
+budb_errs.c: budb_errs.et
+ $(RM) -f budb_errs.c
${COMPILE_ET} -p ${srcdir} budb_errs
database.o: database.c budb_errs.h globals.h ${INCLS}
db_hash.o: db_hash.c budb_errs.h ${INCLS}
ol_verify.o: ol_verify.c budb_errs.h ${INCLS}
procs.o: procs.c budb_errs.h globals.h ${INCLS}
-struct_ops.o: budb_errs.h ${TOP_INCDIR}/afs/budb_client.h
+struct_ops.o: budb_errs.h ${INCLS}
server.o: server.c budb_errs.h ${INCLS} AFS_component_version_number.c
budb_server: $(SERVER_OBJS) ${LIBS} ${TOP_INCDIR}/afs/budb_client.h
# Misc targets
#
clean:
- $(RM) -f *.o *~ budb_errs.[ch] budb.h budb_client.h *.a *.xdr.c \
+ $(RM) -f *.o *~ budb_errs.[ch] budb.h *.a *.xdr.c \
*.ss.c *.cs.c core budb_server AFS_component_version_number.c
include ../config/Makefile.version
############################################################################
# compile_et on budb_errs.et
-$(INCFILEDIR)\budb_errs.h : budb_errs.et
- $(COMPILE_ET) budb_errs -h budb_errs
+
+$(INCFILEDIR)\budb_errs.h: budb_errs.c
$(COPY) budb_errs.h $(INCFILEDIR)\budb_errs.h
-budb_errs.c $(INCFILEDIR)\budb_client.h: budb_errs.et budb_client.p.h
- $(DEL) budb_client.h budb_errs.c
- $(COMPILE_ET) budb_errs -h budb_client
- $(COPY) budb_client.h $(INCFILEDIR)\budb_client.h
+budb_errs.c: budb_errs.et
+ $(DEL) budb_errs.c
+ $(COMPILE_ET) budb_errs
############################################################################
# install
clean::
$(DEL) $(INCFILES)
- $(DEL) budb_errs.c budb_errs.h budb.h budb_client.h
+ $(DEL) budb_errs.c budb_errs.h budb.h
$(DEL) budb.cs.c budb.ss.c budb.xdr.c
mkdir:
--- /dev/null
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ *
+ * 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
+ */
+
+#ifndef __BUDB_CLIENT__
+#define __BUDB_CLIENT__
+
+#include <ubik.h>
+#ifndef BUDB_MAJORVERSION /* get the installed RPC stuff */
+#include <sys/types.h>
+#include <rx/xdr.h>
+#include <afs/budb.h>
+#endif
+
+#include <afs/budb_errs.h>
+
+/* for ubik_Call_SingleServer */
+
+#define UF_SINGLESERVER 1 /* begin single server operation */
+#define UF_END_SINGLESERVER 2 /* terminate single server operation */
+
+
+/* handle for the ubik database connection */
+
+struct udbHandleS {
+ afs_int32 uh_scIndex; /* what type of sec. object */
+ struct rx_securityClass *uh_secobj; /* security object */
+ struct rx_connection *uh_serverConn[MAXSERVERS]; /* server connections */
+ struct ubik_client *uh_client; /* ubik client handle */
+ afs_uint32 uh_instanceId; /* instance of client */
+};
+
+typedef struct udbHandleS udbHandleT;
+typedef udbHandleT *udbHandleP;
+
+/* suggested text block management structure */
+
+struct udbClientTextS {
+ char *textName; /* for info. only */
+ afs_int32 textType; /* used as key for access */
+ afs_uint32 textVersion; /* version # for cache mgmt */
+ afs_uint32 lockHandle; /* for atomicity */
+ afs_int32 textSize; /* no. of bytes */
+ FILE *textStream; /* file stream or NULL */
+};
+
+typedef struct udbClientTextS udbClientTextT;
+typedef udbClientTextT *udbClientTextP;
+
+#endif
+++ /dev/null
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- *
- * 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
- */
-
-#ifndef __BUDB_CLIENT__
-#define __BUDB_CLIENT__
-
-#include <ubik.h>
-#ifndef BUDB_MAJORVERSION /* get the installed RPC stuff */
-#include <sys/types.h>
-#include <rx/xdr.h>
-#include <afs/budb.h>
-#endif
-
-
-/* for ubik_Call_SingleServer */
-
-#define UF_SINGLESERVER 1 /* begin single server operation */
-#define UF_END_SINGLESERVER 2 /* terminate single server operation */
-
-
-/* handle for the ubik database connection */
-
-struct udbHandleS {
- afs_int32 uh_scIndex; /* what type of sec. object */
- struct rx_securityClass *uh_secobj; /* security object */
- struct rx_connection *uh_serverConn[MAXSERVERS]; /* server connections */
- struct ubik_client *uh_client; /* ubik client handle */
- afs_uint32 uh_instanceId; /* instance of client */
-};
-
-typedef struct udbHandleS udbHandleT;
-typedef udbHandleT *udbHandleP;
-
-/* suggested text block management structure */
-
-struct udbClientTextS {
- char *textName; /* for info. only */
- afs_int32 textType; /* used as key for access */
- afs_uint32 textVersion; /* version # for cache mgmt */
- afs_uint32 lockHandle; /* for atomicity */
- afs_int32 textSize; /* no. of bytes */
- FILE *textStream; /* file stream or NULL */
-};
-
-typedef struct udbClientTextS udbClientTextT;
-typedef udbClientTextT *udbClientTextP;
-
-#endif
# to check that you haven't inadvertently ignored any tracked files.
/budb.h
-/budb_client.h
/budb_errs.c
/budb_errs.h
/budb_server
${TOP_INCDIR}/afs/cellconfig.h \
${TOP_INCDIR}/afs/com_err.h \
${TOP_INCDIR}/afs/bubasics.h \
- budb.h budb_client.h
+ ${TOP_INCDIR}/afs/budb_client.h \
+ ${TOP_INCDIR}/afs/budb_errs.h \
+ budb.h $(BUDB)/budb_client.h
# library ordering defined by top level makefile
LIBS=${RXOBJS} ${UTILOBJS} \
all: ${TOP_LIBDIR}/libbudb.a ${TOP_INCDIR}/afs/budb.h ${TOP_INCDIR}/afs/budb_errs.h ${TOP_INCDIR}/afs/budb_client.h budb_server ${INCLS}
-#
-# budb_errs.o actually depends on neither budb_client.h nor budb_errs.h
-# but generating either of them will rebuild budb_errs.c
-#
-budb_errs.o: budb_errs.c budb_client.h budb_errs.h
-
-budb_errs.c budb_client.h: ${BUDB}/budb_errs.et ${BUDB}/budb_client.p.h
- $(RM) -f budb_client.h budb_errs.c; ${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs -h budb_client
+budb_errs.h: budb_errs.c
-budb_errs.h: ${BUDB}/budb_errs.et
+budb_errs.c: ${BUDB}/budb_errs.et
+ $(RM) -f budb_errs.c
${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs
#
procs.o: ${BUDB}/procs.c budb_errs.h ${INCLS}
${CCRULE} ${srcdir}/${BUDB}/procs.c
-struct_ops.o: ${BUDB}/struct_ops.c budb_errs.h ${TOP_INCDIR}/afs/budb_client.h
+struct_ops.o: ${BUDB}/struct_ops.c budb_errs.h ${INCLS}
${CCRULE} ${srcdir}/${BUDB}/struct_ops.c
server.o: ${BUDB}/server.c budb_errs.h ${INCLS}
# Misc targets
#
clean:
- $(RM) -f *.o *~ budb_errs.[ch] budb.h budb_client.h *.a *.xdr.c \
+ $(RM) -f *.o *~ budb_errs.[ch] budb.h *.a *.xdr.c \
*.ss.c *.cs.c core budb_server AFS_component_version_number.c
include ../config/Makefile.version