Rename library and use proper versioning

Previously the version of libproc always tracked the version of procps.
This doesn't work when other non-procps programs link to the library as
they are always playing catch up.

This change makes the library version independent of the procps version.
It will only be incremented when needed.
This commit is contained in:
Craig Small 2011-12-17 22:35:05 +11:00
parent 5a991f0444
commit 38763ede40
7 changed files with 22 additions and 17 deletions

4
.gitignore vendored
View File

@ -28,8 +28,8 @@ pkill
pmap pmap
procps-ng-*.tar.gz procps-ng-*.tar.gz
proc/.depend proc/.depend
proc/libproc-ng.la proc/libprocfs.la
proc/libproc-ng.pc proc/libprocfs.pc
proc/Makefile proc/Makefile
proc/Makefile.in proc/Makefile.in
ps/Makefile ps/Makefile

View File

@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = proc ps testsuite SUBDIRS = proc ps testsuite
AM_CFLAGS = -Iproc AM_CFLAGS = -Iproc
AM_LDFLAGS = ./proc/libproc-ng.la AM_LDFLAGS = ./proc/libprocfs.la
sbin_PROGRAMS = \ sbin_PROGRAMS = \
sysctl sysctl

View File

@ -145,7 +145,7 @@ AC_SUBST(DEJAGNU)
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
proc/Makefile proc/Makefile
proc/libproc-ng.pc proc/libprocfs.pc
ps/Makefile ps/Makefile
testsuite/Makefile testsuite/Makefile
]) ])

View File

@ -1,22 +1,27 @@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
AM_CPPFLAGS = -include $(top_builddir)/config.h AM_CPPFLAGS = -include $(top_builddir)/config.h
lib_LTLIBRARIES = libproc-ng.la
libproc_ng_ladir = $(ladir) LIBPROCFS_CURRENT=0
libproc_ng_la_LIBADD = $(LIB_KPARTS) LIBPROCFS_REVISION=0
libproc_ng_la_LDFLAGS = \ LIBPROCFS_AGE=0
lib_LTLIBRARIES = libprocfs.la
libprocfs_ladir = $(ladir)
libprocfs_la_LIBADD = $(LIB_KPARTS)
libprocfs_la_LDFLAGS = \
$(AM_LDFLAGS) \ $(AM_LDFLAGS) \
$(all_libraries) \ $(all_libraries) \
-release $(PACKAGE_VERSION) \ -version-info $(LIBPROCFS_CURRENT):$(LIBPROCFS_REVISION):$(LIBPROCFS_AGE) \
-no-undefined \ -no-undefined \
-Wl,--version-script=$(top_srcdir)/proc/library.map -Wl,--version-script=$(top_srcdir)/proc/libprocfs.sym
EXTRA_DIST = library.map EXTRA_DIST = library.map
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libproc-ng.pc pkgconfig_DATA = libprocfs.pc
libproc_ng_la_SOURCES = \ libprocfs_la_SOURCES = \
alloc.c \ alloc.c \
alloc.h \ alloc.h \
devname.c \ devname.c \
@ -41,8 +46,8 @@ libproc_ng_la_SOURCES = \
whattime.c \ whattime.c \
whattime.h whattime.h
libproc_ng_la_includedir = $(includedir)/proc/ libprocfs_la_includedir = $(includedir)/proc/
libproc_ng_la_include_HEADERS = \ libprocfs_la_include_HEADERS = \
alloc.h \ alloc.h \
devname.h \ devname.h \
escape.h \ escape.h \

View File

@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@
libdir=@libdir@ libdir=@libdir@
includedir=@includedir@ includedir=@includedir@
Name: libproc-ng Name: libprocfs
Description: Library to control and query process state Description: Library to control and query process state
Version: @VERSION@ Version: @VERSION@
Libs: -L${libdir} -lproc-ng Libs: -L${libdir} -lprocfs
Libs.private: Libs.private:
Cflags: -I${includedir} Cflags: -I${includedir}

View File

@ -1,7 +1,7 @@
AM_CPPFLAGS = -include $(top_builddir)/config.h AM_CPPFLAGS = -include $(top_builddir)/config.h
AM_CFLAGS = -I../proc AM_CFLAGS = -I../proc
AM_LDFLAGS = ../proc/libproc-ng.la AM_LDFLAGS = ../proc/libprocfs.la
dist_man_MANS = ps.1 dist_man_MANS = ps.1