Browse Source

(somewhat unrelated cleanups, but all are very minor)

2004-07-23  Greg Troxel  <gdt@poblano.ir.bbn.com>

	* */Makefile.am: Use ../dir/libfoo.la, rather than "-L../dir
	-lfoo", to avoid linking against installed libraries from a
	previous version.

	* {lib,ospfd,ospfclient}/Makefile.am: explicitly define the shared
	library version number to be 0.0

	* configure.ac: remove spurious , so extract.pl is chmod'd +x.

	* HACKING: explain shared library versioning rules
gdt 15 years ago
parent
commit
b7a97f8257
14 changed files with 57 additions and 16 deletions
  1. 13 0
      ChangeLog
  2. 23 1
      HACKING
  3. 1 1
      bgpd/Makefile.am
  4. 4 3
      configure.ac
  5. 1 1
      guile/Makefile.am
  6. 1 1
      isisd/Makefile.am
  7. 1 0
      lib/Makefile.am
  8. 1 1
      ospf6d/Makefile.am
  9. 3 1
      ospfclient/Makefile.am
  10. 3 1
      ospfd/Makefile.am
  11. 1 1
      ripd/Makefile.am
  12. 1 1
      ripngd/Makefile.am
  13. 1 1
      vtysh/Makefile.am
  14. 3 3
      zebra/Makefile.am

+ 13 - 0
ChangeLog

@@ -1,3 +1,16 @@
+2004-07-23  Greg Troxel  <gdt@poblano.ir.bbn.com>
+
+	* */Makefile.am: Use ../dir/libfoo.la, rather than "-L../dir
+	-lfoo", to avoid linking against installed libraries from a
+	previous version.
+
+	* {lib,ospfd,ospfclient}/Makefile.am: explicitly define the shared
+	library version number to be 0.0
+
+	* configure.ac: remove spurious , so extract.pl is chmod'd +x.
+	
+	* HACKING: explain shared library versioning rules
+	
 2004-07-22 Paul Jakma <paul@dishone.st>
 
 	* configure.ac: modify default CFLAGS to be compiler agnostic

+ 23 - 1
HACKING

@@ -1,6 +1,6 @@
 -*- mode: text; -*-
 
-$Id: HACKING,v 1.6 2004/05/13 13:38:06 paul Exp $
+$Id: HACKING,v 1.7 2004/07/23 16:23:56 gdt Exp $
 
 GUIDELINES FOR HACKING ON QUAGGA
 
@@ -29,6 +29,28 @@ level.
 [TBD: resolve per-dir vs top-level, perhaps by reading GNU coding
 standards]
 
+SHARED LIBRARY VERSIONING
+
+[this section is at the moment just gdt's opinion]
+
+Quagga builds several shared libaries (lib/libzebra, ospfd/libospf,
+ospfclient/libsopfapiclient).  These may be used by external programs,
+e.g. a new routing protocol that works with the zebra daemon, or
+ospfapi clients.  The libtool info pages (node Versioning) explain
+when major and minor version numbers should be changed.  These values
+are set in Makefile.am near the definition of the library.  If you
+make a change that requires changing the shared library version,
+please update Makefile.am.
+
+libospf exports far more than it should, and is needed by ospfapi
+clients.  Only bump libospf for changes to functions for which it is
+reasonable for a user of ospfapi to call, and please err on the side
+of not bumping.
+
+There is no support intended for installing part of zebra.  The core
+library libzebra and the included daemons should always be built and
+installed together.
+
 PATCH SUBMISSION
 
 * Send a clean diff against the head of CVS in unified diff format, eg by:

+ 1 - 1
bgpd/Makefile.am

@@ -24,7 +24,7 @@ noinst_HEADERS = \
 bgpd_SOURCES = \
 	bgp_main.c $(libbgp_a_SOURCES)
 
-bgpd_LDADD = -L../lib -lzebra @LIBCAP@
+bgpd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = bgpd.conf.sample bgpd.conf.sample2

+ 4 - 3
configure.ac

@@ -5,7 +5,7 @@
 ##  Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
 ##  Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
 ##
-## $Id: configure.ac,v 1.56 2004/07/22 18:16:59 paul Exp $
+## $Id: configure.ac,v 1.57 2004/07/23 16:23:56 gdt Exp $
 AC_PREREQ(2.53)
 
 AC_INIT(quagga, 0.96.5, [http://bugzilla.quagga.net])
@@ -1124,8 +1124,9 @@ AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile
 	  ospfclient/Makefile
 	  vtysh/extract.pl
 	  redhat/Makefile redhat/quagga.spec
-	  lib/version.h,
-	  tests/Makefile,
+	  lib/version.h
+dnl	  tests/Makefile
+	  ,
 	  [chmod +x vtysh/extract.pl])
 
 echo "

+ 1 - 1
guile/Makefile.am

@@ -6,4 +6,4 @@ DEFS = @DEFS@ -I. -I$(srcdir)
 bin_PROGRAMS = zebra-guile
 zebra_guile_SOURCES = zebra-guile.c zebra-support.c guile-bgp.c
 noinst_HEADERS = zebra-guile.h
-zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a -L../lib -lzebra
+zebra_guile_LDADD = @GUILE_LDFLAGS@ ../bgpd/libbgp.a ../lib/libzebra.la

+ 1 - 1
isisd/Makefile.am

@@ -25,7 +25,7 @@ noinst_HEADERS = \
 isisd_SOURCES = \
 	isis_main.c $(libisis_a_SOURCES)
 
-isisd_LDADD = -L../lib -lzebra @LIBCAP@
+isisd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = isisd.conf.sample

+ 1 - 0
lib/Makefile.am

@@ -4,6 +4,7 @@ INCLUDES = @INCLUDES@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
 
 lib_LTLIBRARIES = libzebra.la
+libzebra_la_LDFLAGS = -version 0:0:0
 
 libzebra_la_SOURCES = \
 	version.c network.c pid_output.c getopt.c getopt1.c daemon.c \

+ 1 - 1
ospf6d/Makefile.am

@@ -22,7 +22,7 @@ noinst_HEADERS = \
 ospf6d_SOURCES = \
 	ospf6_main.c $(libospf6_a_SOURCES)
 
-ospf6d_LDADD = -L../lib -lzebra @LIBCAP@
+ospf6d_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = ospf6d.conf.sample

+ 3 - 1
ospfclient/Makefile.am

@@ -3,6 +3,8 @@
 INCLUDES = -I../lib -I../
 
 lib_LTLIBRARIES = libospfapiclient.la
+libospfapiclient_la_LDFLAGS = -version 0:0:0
+
 sbin_PROGRAMS = ospfclient
 
 libospfapiclient_la_SOURCES = \
@@ -17,6 +19,6 @@ ospfclient_SOURCES = \
 	ospfclient.c
 
 ospfclient_LDADD = libospfapiclient.la \
-	-L../ospfd -lospf -L../lib -lzebra @LIBCAP@
+	../ospfd/libospf.la ../lib/libzebra.la @LIBCAP@
 
 

+ 3 - 1
ospfd/Makefile.am

@@ -5,6 +5,8 @@ DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
 INSTALL_SDATA=@INSTALL@ -m 600
 
 lib_LTLIBRARIES = libospf.la
+libospf_la_LDFLAGS = -version 0:0:0
+
 sbin_PROGRAMS = ospfd
 
 libospf_la_SOURCES = \
@@ -27,7 +29,7 @@ noinst_HEADERS = \
 
 ospfd_SOURCES = ospf_main.c
 
-ospfd_LDADD = libospf.la -L../lib -lzebra @LIBCAP@
+ospfd_LDADD = libospf.la ../lib/libzebra.la @LIBCAP@
 
 EXTRA_DIST = OSPF-MIB.txt OSPF-TRAP-MIB.txt ChangeLog.opaque.txt
 

+ 1 - 1
ripd/Makefile.am

@@ -17,7 +17,7 @@ noinst_HEADERS = \
 ripd_SOURCES = \
 	rip_main.c $(librip_a_SOURCES)
 
-ripd_LDADD = -L../lib -lzebra @LIBCAP@
+ripd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = ripd.conf.sample

+ 1 - 1
ripngd/Makefile.am

@@ -17,7 +17,7 @@ noinst_HEADERS = \
 ripngd_SOURCES = \
 	ripng_main.c $(libripng_a_SOURCES)
 
-ripngd_LDADD = -L../lib -lzebra @LIBCAP@
+ripngd_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = ripngd.conf.sample

+ 1 - 1
vtysh/Makefile.am

@@ -11,7 +11,7 @@ vtysh_SOURCES = vtysh_main.c vtysh.c vtysh_user.c vtysh_config.c
 nodist_vtysh_SOURCES = vtysh_cmd.c
 CLEANFILES = vtysh_cmd.c
 noinst_HEADERS = vtysh.h vtysh_user.h
-vtysh_LDADD = -L../lib -lzebra @LIBCAP@
+vtysh_LDADD = ../lib/libzebra.la @LIBCAP@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = vtysh.conf.sample

+ 3 - 3
zebra/Makefile.am

@@ -30,7 +30,7 @@ noinst_HEADERS = \
 	connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
 	interface.h ipforward.h irdp.h
 
-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) -L../lib -lzebra
+zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
 
 zebra_DEPENDENCIES = $(otherobj)
 
@@ -42,8 +42,8 @@ EXTRA_DIST = if_ioctl.c if_ioctl_solaris.c if_netlink.c if_proc.c \
 	ioctl.c ioctl_solaris.c \
 	GNOME-SMI GNOME-PRODUCT-ZEBRA-MIB
 
-#client : client_main.o -L../lib -lzebra
-#	$(CC) -g -o client client_main.o -L../lib -lzebra $(LIBS) $(LIB_IPV6)
+#client : client_main.o ../lib/libzebra.la
+#	$(CC) -g -o client client_main.o ../liblzebra.la $(LIBS) $(LIB_IPV6)
 
 quaggaconfdir = $(sysconfdir)