[5409] in Moira
Shared libmoira?
daemon@ATHENA.MIT.EDU (Evan Broder)
Thu Jan 22 19:10:18 2009
Message-ID: <49790AB4.2020409@mit.edu>
Date: Thu, 22 Jan 2009 19:09:24 -0500
From: Evan Broder <broder@MIT.EDU>
MIME-Version: 1.0
To: moiradev@mit.edu
Content-Type: multipart/mixed;
boundary="------------010200000200050307060001"
This is a multi-part message in MIME format.
--------------010200000200050307060001
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
I've been tossing around a patch for the past few months to build and
link libmoira as a shared library rather than (well, actually, in
addition to) a static one. I'm interested in knowing if this patch has
any chance of getting merged, and if so, what sort of changes Ops would
want to see before it is merged.
My specific use case for this is 64-bit Athena 10. Static libraries are
linked without -fPIC, and shared libraries can't link against static
libraries without -fPIC. For me, this means that I can't link the Moira
bindings for Python that I've been working on without this patch on a
64-bit system (or on OS X, but I assume you care even less about that case).
I'll attach the patch for the list's perusal, but I don't consider it
complete at this point. For starters, I've only touched the code that
gets built for clients; I haven't fixed any of the server Makefiles. I'd
also like a cleaner solution to my patch to lib/critical.c (since shared
libraries don't play nice with variables in the library's namespace),
but I'm not sure what to do.
You'll need to have libtool installed for this patch to work, and you'll
need to run aclocal, libtoolize, and autoconf after you apply the patch.
- Evan
--------------010200000200050307060001
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
name="shared-moira.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="shared-moira.patch"
Index: configure.in
===================================================================
RCS file: /mit/moiradev/repository/moira/configure.in,v
retrieving revision 1.45
diff -u -r1.45 configure.in
--- configure.in 21 Jul 2008 21:24:40 -0000 1.45
+++ configure.in 22 Jan 2009 23:26:56 -0000
@@ -46,7 +46,7 @@
AC_PROG_CC
AC_PROG_INSTALL
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
if test "$athena" = true; then
@@ -458,7 +458,7 @@
LIBS="-lmoira $KLIBS"
AC_SUBST(KLIBS)
-MR_LIBDEP='$(BUILDTOP)/lib/libmoira.a'
+MR_LIBDEP='$(BUILDTOP)/lib/libmoira.la'
AC_SUBST(MR_LIBDEP)
AC_OUTPUT(Makefile lib/Makefile include/Makefile clients/Makefile \
Index: clients/addusr/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/addusr/Makefile.in,v
retrieving revision 1.7
diff -u -r1.7 Makefile.in
--- clients/addusr/Makefile.in 5 Jan 2009 22:25:14 -0000 1.7
+++ clients/addusr/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=addusr.o
+OBJS=addusr.lo
TARGET=addusr
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: depend $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) -m 755 addusr $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -m 755 addusr $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/blanche/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/blanche/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- clients/blanche/Makefile.in 5 Jan 2009 22:25:16 -0000 1.6
+++ clients/blanche/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=blanche.o
+OBJS=blanche.lo
TARGET=blanche
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) blanche $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) blanche $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/chfn/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/chfn/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- clients/chfn/Makefile.in 5 Jan 2009 22:25:17 -0000 1.2
+++ clients/chfn/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,6 +18,7 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
@@ -24,15 +26,17 @@
TARGET=chfn
-OBJS=$(TARGET).o
+OBJS=$(TARGET).lo
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
Index: clients/chpobox/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/chpobox/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- clients/chpobox/Makefile.in 5 Jan 2009 22:25:19 -0000 1.2
+++ clients/chpobox/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,6 +18,7 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
@@ -24,15 +26,17 @@
TARGET=chpobox
-OBJS=$(TARGET).o
+OBJS=$(TARGET).lo
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
Index: clients/chsh/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/chsh/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- clients/chsh/Makefile.in 5 Jan 2009 22:25:20 -0000 1.2
+++ clients/chsh/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,6 +18,7 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
@@ -24,15 +26,17 @@
TARGET=chsh
-OBJS=$(TARGET).o
+OBJS=$(TARGET).lo
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $@.o $(LIBS)
Index: clients/mailmaint/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/mailmaint/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- clients/mailmaint/Makefile.in 5 Jan 2009 22:25:22 -0000 1.6
+++ clients/mailmaint/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @CURSES_LIBS@ @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=mailmaint.o
+OBJS=mailmaint.lo
TARGET=mailmaint
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) mailmaint $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) mailmaint $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/mitch/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/mitch/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- clients/mitch/Makefile.in 5 Jan 2009 22:25:23 -0000 1.2
+++ clients/mitch/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=mitch.o
+OBJS=mitch.lo
TARGET=mitch
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) mitch $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) mitch $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/moira/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/moira/Makefile.in,v
retrieving revision 1.10
diff -u -r1.10 Makefile.in
--- clients/moira/Makefile.in 5 Jan 2009 22:25:24 -0000 1.10
+++ clients/moira/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @CURSES_LIBS@ @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,26 +18,29 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-MOBJS= acl.o attach.o cluster.o delete.o globals.o lists.o main.o menu.o \
- menus.o nfs.o pobox.o quota.o user.o utils.o dcmmaint.o printer.o \
- misc.o zephyr.o
-NOBJS= namespace.o globals.o lists.o menu.o pobox.o user.o utils.o misc.o
+MOBJS= acl.lo attach.lo cluster.lo delete.lo globals.lo lists.lo main.lo menu.lo \
+ menus.lo nfs.lo pobox.lo quota.lo user.lo utils.lo dcmmaint.lo printer.lo \
+ misc.lo zephyr.lo
+NOBJS= namespace.lo globals.lo lists.lo menu.lo pobox.lo user.lo utils.lo misc.lo
OBJS= ${MOBJS} ${NOBJS}
TARGET=moira namespace
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -44,8 +48,8 @@
depend:
install: all
- $(INSTALL_PROGRAM) namespace $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) moira $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) namespace $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) moira $(DESTDIR)$(bindir)
rm -f $(DESTDIR)$(bindir)/listmaint
ln -s moira $(DESTDIR)$(bindir)/listmaint
rm -f $(DESTDIR)$(bindir)/dcmmaint
@@ -54,7 +58,7 @@
ln -s moira $(DESTDIR)$(bindir)/usermaint
moira: $(MOBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(MOBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(MOBJS) $(LIBS)
namespace: $(NOBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(NOBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(NOBJS) $(LIBS)
Index: clients/mrcheck/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/mrcheck/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- clients/mrcheck/Makefile.in 5 Jan 2009 22:25:26 -0000 1.6
+++ clients/mrcheck/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=mrcheck.o
+OBJS=mrcheck.lo
TARGET=mrcheck
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) mrcheck $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) mrcheck $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/mrtest/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/mrtest/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- clients/mrtest/Makefile.in 5 Jan 2009 22:25:28 -0000 1.6
+++ clients/mrtest/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @READLINE_LIBS@ @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=mrtest.o
+OBJS=mrtest.lo
TARGET=mrtest
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) mrtest $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) mrtest $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/stanley/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/stanley/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- clients/stanley/Makefile.in 5 Jan 2009 22:25:29 -0000 1.2
+++ clients/stanley/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=stanley.o
+OBJS=stanley.lo
TARGET=stanley
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) stanley $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) stanley $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: clients/stella/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/clients/stella/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- clients/stella/Makefile.in 5 Jan 2009 22:25:31 -0000 1.2
+++ clients/stella/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=../lib/libmrclient.a @LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,22 +18,25 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=../..
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
-OBJS=stella.o
+OBJS=stella.lo
TARGET=stella
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(OBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -40,7 +44,7 @@
depend:
install: all
- $(INSTALL_PROGRAM) stella $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) stella $(DESTDIR)$(bindir)
$(TARGET): $(OBJS) ../lib/libmrclient.a $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
Index: lib/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/lib/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- lib/Makefile.in 28 Jan 2000 00:03:28 -0000 1.5
+++ lib/Makefile.in 22 Jan 2009 23:26:56 -0000
@@ -7,34 +7,45 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
-RANLIB=@RANLIB@
COMPILE_ET=@COMPILE_ET@
+LIBTOOL=@LIBTOOL@
+LDFLAGS=@LDFLAGS@
+KLIBS=@KLIBS@
+ALL_LDFLAGS=$(LDFLAGS) $(KLIBS)
+
+INSTALL=@INSTALL@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
BUILDTOP=..
-
-OBJS= critical.o fixhost.o fixname.o \
- hash.o kname_unparse.o krb_et.o mr_access.o mr_auth.o \
- mr_call.o mr_connect.o mr_et.o mr_init.o mr_ops.o mr_query.o \
- nfsparttype.o sq.o strs.o ureg_err.o
+top_builddir=@top_builddir@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+
+OBJS= critical.lo fixhost.lo fixname.lo \
+ hash.lo kname_unparse.lo krb_et.lo mr_access.lo mr_auth.lo \
+ mr_call.lo mr_connect.lo mr_et.lo mr_init.lo mr_ops.lo mr_query.lo \
+ nfsparttype.lo sq.lo strs.lo ureg_err.lo
ET_H= mr_et.h krb_et.h ureg_err.h
ET_C= mr_et.c krb_et.c ureg_err.c
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
-.SUFFIXES: .et
+.SUFFIXES: .et .lo
.et.c:
$(COMPILE_ET) $<
-all: depend libmoira.a
+all: depend libmoira.la
clean:
- rm -f $(OBJS) $(ET_H) $(ET_C) libmoira.a
+ $(LIBTOOL) --mode=clean rm -f $(OBJS) $(ET_H) $(ET_C) libmoira.la
cleandir distclean: clean
rm -f Makefile
@@ -42,7 +53,7 @@
depend: $(ET_C)
install: all
+ $(LIBTOOL) --mode=install $(INSTALL) -D libmoira.la $(DESTDIR)$(libdir)/libmoira.la
-libmoira.a: $(OBJS)
- ar cru $@ $(OBJS)
- $(RANLIB) $@
+libmoira.la: $(OBJS)
+ $(LIBTOOL) --mode=link $(CC) $(ALL_LDFLAGS) -o $@ $(OBJS) -rpath $(libdir) -version-info 0:0:0
Index: lib/critical.c
===================================================================
RCS file: /mit/moiradev/repository/moira/lib/critical.c,v
retrieving revision 1.21
diff -u -r1.21 critical.c
--- lib/critical.c 21 Sep 2000 07:36:40 -0000 1.21
+++ lib/critical.c 22 Jan 2009 23:26:56 -0000
@@ -33,7 +33,12 @@
/* mode to create the file with */
#define LOGFILEMODE 0644
-extern char *whoami;
+char *whoami;
+
+void set_whoami(char * value)
+{
+ whoami = value;
+}
/* This routine sends a class MOIRA zephyrgram of specified instance
* and logs to a special logfile the message passed to it via msg
Index: update/Makefile.in
===================================================================
RCS file: /mit/moiradev/repository/moira/update/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- update/Makefile.in 5 Jan 2009 22:25:50 -0000 1.6
+++ update/Makefile.in 22 Jan 2009 23:34:23 -0000
@@ -8,6 +8,7 @@
CFLAGS=@CFLAGS@
DEFS=@DEFS@
ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS)
+LIBTOOL=@LIBTOOL@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
MR_LIBDEP=@MR_LIBDEP@
@@ -17,6 +18,7 @@
srcdir=@srcdir@
VPATH=@srcdir@
SRCTOP=@top_srcdir@
+top_builddir=@top_builddir@
BUILDTOP=..
prefix=@prefix@
exec_prefix=@exec_prefix@
@@ -24,19 +26,21 @@
sbindir=@sbindir@
sysconfdir=@sysconfdir@
-SOBJS= auth_002.o auth_003.o checksum.o config.o exec_002.o get_file.o \
- update_server.o xfer_002.o xfer_003.o sendrecv.o
-COBJS= update_test.o checksum.o client.o send_file.o ticket.o sendrecv.o
+SOBJS= auth_002.lo auth_003.lo checksum.lo config.lo exec_002.lo get_file.lo \
+ update_server.lo xfer_002.lo xfer_003.lo sendrecv.lo
+COBJS= update_test.lo checksum.lo client.lo send_file.lo ticket.lo sendrecv.lo
TARGET=update_server update_test
-.c.o:
- $(CC) -c $(ALL_CFLAGS) $<
+.SUFFIXES: .lo
+
+.c.lo:
+ $(LIBTOOL) --mode=compile $(CC) -c $(ALL_CFLAGS) $<
all: $(TARGET)
clean:
- rm -f $(SOBJS) $(COBJS) $(TARGET)
+ $(LIBTOOL) --mode=clean rm -f $(SOBJS) $(COBJS) $(TARGET)
cleandir distclean: clean
rm -f Makefile
@@ -44,13 +48,13 @@
depend:
install: all
- $(INSTALL_PROGRAM) update_test $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) update_server $(DESTDIR)$(sbindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) update_test $(DESTDIR)$(bindir)
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) update_server $(DESTDIR)$(sbindir)
$(SRCTOP)/mkinstalldirs $(DESTDIR)$(sysconfdir)/athena
$(INSTALL) -m 644 moira.conf $(DESTDIR)$(sysconfdir)/athena/moira.conf
update_test: $(COBJS) $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(COBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(COBJS) $(LIBS)
update_server: $(SOBJS) $(MR_LIBDEP)
- $(CC) -o $@ $(LDFLAGS) $(SOBJS) $(LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(LDFLAGS) $(SOBJS) $(LIBS)
--------------010200000200050307060001--