Update library scripts to use only major/micro version numbers, and to

only add a symlink for linking (let ldconfig make symlinks for sonames).
This commit is contained in:
Laurence Withers 2007-09-11 22:21:05 +00:00
parent ec8bcba829
commit 444fca6eff
7 changed files with 12 additions and 33 deletions

View File

@ -10,11 +10,8 @@ echo "Installing libraries into '${LIBDIR}'"
install_file ${@CNAME@} ${LIBDIR} 0755 || return 1 install_file ${@CNAME@} ${LIBDIR} 0755 || return 1
BASE="${@CNAME@_BASE}.so" BASE="${@CNAME@_BASE}.so"
MAJOR="${BASE}.${SOMAJOR}" MAJOR="${BASE}.${SOMAJOR}"
MINOR="${MAJOR}.${SOMINOR}" MICRO="${MAJOR}.${SOMICRO}"
MICRO="${MINOR}.${SOMICRO}" install_symlink "${BASE}" "${MICRO}" "${LIBDIR}"
install_symlink "${MINOR}" "${MICRO}" "${LIBDIR}"
install_symlink "${MAJOR}" "${MINOR}" "${LIBDIR}"
install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
# install header # install header
echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}" echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}"

View File

@ -11,7 +11,7 @@ then
@CNAME@_BASE=@NAME@ @CNAME@_BASE=@NAME@
source src/@NAME@/soversion source src/@NAME@/soversion
@CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}.${SOMICRO}" @CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMICRO}"
@CNAME@_DEP_CFLAGS="" # @TODO@ cflags @CNAME@_DEP_CFLAGS="" # @TODO@ cflags
@CNAME@_DEP_LIBS="" # @TODO@ libs @CNAME@_DEP_LIBS="" # @TODO@ libs
SO_EXTRA="${@CNAME@_DEP_CFLAGS} ${@CNAME@_DEP_LIBS} -lstdc++ -lc" SO_EXTRA="${@CNAME@_DEP_CFLAGS} ${@CNAME@_DEP_LIBS} -lstdc++ -lc"
@ -34,7 +34,7 @@ then
then then
echo " Compiling" echo " Compiling"
SONAME="${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}" SONAME="${@CNAME@_BASE}.so.${SOMAJOR}"
do_cmd ${CXX} ${CFLAGS} -Iobj -shared -fpic -o "${@CNAME@}" \ do_cmd ${CXX} ${CFLAGS} -Iobj -shared -fpic -o "${@CNAME@}" \
-Wl,-soname,${SONAME} \ -Wl,-soname,${SONAME} \
${SRC} ${SO_EXTRA} || return 1 ${SRC} ${SO_EXTRA} || return 1

View File

@ -7,11 +7,9 @@
# SOMAJOR and SOMINOR are included in the library's soname. They need to # SOMAJOR is included in the library's soname, and needs to be bumped
# be bumped on a binary-incompatible release. They are both single # after a binary-incompatible release. It is a single integer.
# integers.
SOMAJOR=0 SOMAJOR=0
SOMINOR=0
# SOMICRO is bumped every time there is a binary-compatible release. # SOMICRO is bumped every time there is a binary-compatible release.
SOMICRO=0 SOMICRO=0

View File

@ -10,11 +10,8 @@ echo "Installing libraries into '${LIBDIR}'"
install_file ${@CNAME@} ${LIBDIR} 0755 || return 1 install_file ${@CNAME@} ${LIBDIR} 0755 || return 1
BASE="${@CNAME@_BASE}.so" BASE="${@CNAME@_BASE}.so"
MAJOR="${BASE}.${SOMAJOR}" MAJOR="${BASE}.${SOMAJOR}"
MINOR="${MAJOR}.${SOMINOR}" MICRO="${MAJOR}.${SOMICRO}"
MICRO="${MINOR}.${SOMICRO}" install_symlink "${BASE}" "${MICRO}" "${LIBDIR}"
install_symlink "${MINOR}" "${MICRO}" "${LIBDIR}"
install_symlink "${MAJOR}" "${MINOR}" "${LIBDIR}"
install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
# install header # install header
echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}" echo "Installing header file '${@CNAME@_HEADER}' into ${INCLUDEDIR}"

View File

@ -11,7 +11,7 @@ then
@CNAME@_BASE=@NAME@ @CNAME@_BASE=@NAME@
source src/@NAME@/soversion source src/@NAME@/soversion
@CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}.${SOMICRO}" @CNAME@="obj/${@CNAME@_BASE}.so.${SOMAJOR}.${SOMICRO}"
@CNAME@_DEP_CFLAGS="" # @TODO@ cflags @CNAME@_DEP_CFLAGS="" # @TODO@ cflags
@CNAME@_DEP_LIBS="" # @TODO@ libs @CNAME@_DEP_LIBS="" # @TODO@ libs
SO_EXTRA="${@CNAME@_DEP_CFLAGS} ${@CNAME@_DEP_LIBS} -lc" SO_EXTRA="${@CNAME@_DEP_CFLAGS} ${@CNAME@_DEP_LIBS} -lc"
@ -34,7 +34,7 @@ then
then then
echo " Compiling" echo " Compiling"
SONAME="${@CNAME@_BASE}.so.${SOMAJOR}.${SOMINOR}" SONAME="${@CNAME@_BASE}.so.${SOMAJOR}"
do_cmd ${CC} ${CFLAGS} -Iobj -shared -fpic -o "${@CNAME@}" \ do_cmd ${CC} ${CFLAGS} -Iobj -shared -fpic -o "${@CNAME@}" \
-Wl,-soname,${SONAME} \ -Wl,-soname,${SONAME} \
${SRC} ${SO_EXTRA} || return 1 ${SRC} ${SO_EXTRA} || return 1

View File

@ -7,11 +7,9 @@
# SOMAJOR and SOMINOR are included in the library's soname. They need to # SOMAJOR is included in the library's soname, and needs to be bumped
# be bumped on a binary-incompatible release. They are both single # after a binary-incompatible release. It is a single integer.
# integers.
SOMAJOR=0 SOMAJOR=0
SOMINOR=0
# SOMICRO is bumped every time there is a binary-compatible release. # SOMICRO is bumped every time there is a binary-compatible release.
SOMICRO=0 SOMICRO=0

View File

@ -8,7 +8,6 @@ then
echo " minor - bump minor version, reset micro" echo " minor - bump minor version, reset micro"
echo " micro - bump micro version" echo " micro - bump micro version"
echo " libmajor LIB - as major but for soversion" echo " libmajor LIB - as major but for soversion"
echo " libminor LIB - as minor but for soversion"
echo " libmicro LIB - as micro but for soversion" echo " libmicro LIB - as micro but for soversion"
echo " tag - tag version" echo " tag - tag version"
echo " push - do a git-push with --tags" echo " push - do a git-push with --tags"
@ -54,11 +53,6 @@ bump_somajor() {
edit_versions "src/$1/soversion" "SOMAJOR" "$[${SOMAJOR} + 1]" "SOMINOR" "0" "SOMICRO" "0" edit_versions "src/$1/soversion" "SOMAJOR" "$[${SOMAJOR} + 1]" "SOMINOR" "0" "SOMICRO" "0"
} }
bump_sominor() {
source src/$1/soversion
edit_versions "src/$1/soversion" "SOMINOR" "$[${SOMINOR} + 1]" "SOMICRO" "0"
}
bump_somicro() { bump_somicro() {
source src/$1/soversion source src/$1/soversion
edit_versions "src/$1/soversion" "SOMICRO" "$[${SOMICRO} + 1]" edit_versions "src/$1/soversion" "SOMICRO" "$[${SOMICRO} + 1]"
@ -96,11 +90,6 @@ do
shift shift
;; ;;
libminor)
bump_sominor $2
shift
;;
libmicro) libmicro)
bump_somicro $2 bump_somicro $2
shift shift