Upgrade build system, bump version

This commit is contained in:
Laurence Withers 2007-09-13 10:25:31 +00:00
parent 7d35697775
commit 2a51412ade
14 changed files with 105 additions and 35 deletions

32
config
View File

@ -1,20 +1,36 @@
# libiso8601/config
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4
#
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
# Released under the GNU GPLv2. See file COPYING or
# http://www.gnu.org/copyleft/gpl.html for details.
#
# This file contains options used to build libiso8601.
#
# PREFIX is the most important option. Many other paths are derived from it, as follows:
#
# PREFIX | / | /usr | /usr/local | /opt/*
# ------------+-------------------+-------------------+-------------------+-----------------
# BINDIR | /bin | /usr/bin | /usr/local/bin | /opt/*/bin
# SBINDIR | /sbin | /usr/sbin | /usr/local/sbin | /opt/*/sbin
# LIBDIR | /lib | /usr/lib | /usr/local/lib | /opt/*/lib
# INCLUDEDIR | /usr/include | /usr/include | /usr/local/include| /opt/*/include
# CONFIGDIR | /etc | /etc | /usr/local/etc | /etc/opt/*
# VARDIR | /var | /var | /var | /var/opt/*
# SHAREDIR | /usr/share | /usr/share | /usr/local/share | /opt/*/share
# DOCSDIR | /usr/share/doc | /usr/share/doc | /usr/local/share/doc, /opt/*/doc
# WEBDIR | /srv/http | /srv/http | /srv/http | /opt/*/http
#
# Specific notes:
# When installing, all paths are prepended with INSTALL_PREFIX.
# Any parameter can be overridden by setting an environment variable.
# CGIDIR is set to ${WEBDIR}/cgi-bin .
#
[ -z "${PREFIX}" ] && PREFIX="/usr/local"
source "scripts/paths"
# Project-specific variables below.
[ -z "${CC}" ] && CC="gcc"
[ -z "${CFLAGS}" ] && CFLAGS="-g -O2 -W -Wall"
[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${PREFIX}/include"
[ -z "${FINALLIBDIR}" ] && FINALLIBDIR="${LIBDIR}"
[ -z "${FINALINCLUDEDIR}" ] && FINALINCLUDEDIR="${INCLUDEDIR}"
[ -z "${DOCSDIR}" ] && DOCSDIR="${PREFIX}/doc/libiso8601"

1
scripts/.gitignore vendored
View File

@ -9,6 +9,7 @@ build.firmware.gpasm
build.firmware.sdcc
build.lib.c
build.lib.c++
build.make.none
build.module.c
build.tests.c
build.tests.c++

58
scripts/paths Normal file
View File

@ -0,0 +1,58 @@
# libiso8601/scripts/paths
# vim: syntax=sh:sw=4:ts=4:expandtab
#
# Default path setup. Not meant for editing; use environment variables
# to override values if needed.
#
case "${PREFIX}" in
/)
BINDIR="/bin"
SBINDIR="/sbin"
LIBDIR="/lib"
INCLUDEDIR="/usr/include"
CONFIGDIR="/etc"
VARDIR="/var"
SHAREDIR="/usr/share/libiso8601"
DOCSDIR="/usr/share/doc/libiso8601"
WEBDIR="/srv/http"
;;
/usr)
BINDIR="/usr/bin"
SBINDIR="/usr/sbin"
LIBDIR="/usr/lib"
INCLUDEDIR="/usr/include"
CONFIGDIR="/etc"
VARDIR="/var"
SHAREDIR="/usr/share/libiso8601"
DOCSDIR="/usr/share/doc/libiso8601"
WEBDIR="/srv/http"
;;
/usr/local)
BINDIR="/usr/local/bin"
SBINDIR="/usr/local/sbin"
LIBDIR="/usr/local/lib"
INCLUDEDIR="/usr/local/include"
CONFIGDIR="/usr/local/etc"
VARDIR="/var"
SHAREDIR="/usr/local/share/libiso8601"
DOCSDIR="/usr/local/share/doc/libiso8601"
WEBDIR="/srv/http"
;;
/opt/*)
BINDIR="${PREFIX}/bin"
SBINDIR="${PREFIX}/sbin"
LIBDIR="${PREFIX}/lib"
INCLUDEDIR="${PREFIX}/include"
CONFIGDIR="/etc${PREFIX}"
VARDIR="/var${PREFIX}"
SHAREDIR="/var${PREFIX}"
DOCSDIR="${PREFIX}/doc"
WEBDIR="${PREFIX}/http"
;;
esac
CGIDIR="${WEBDIR}/cgi-bin"

View File

@ -46,7 +46,7 @@ CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES

View File

@ -40,4 +40,4 @@ then
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -18,4 +18,4 @@ done
print_success "Documentation installed"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -10,11 +10,8 @@ echo "Installing libraries into '${LIBDIR}'"
install_file ${libiso8601} ${LIBDIR} 0755 || return 1
BASE="${libiso8601_BASE}.so"
MAJOR="${BASE}.${SOMAJOR}"
MINOR="${MAJOR}.${SOMINOR}"
MICRO="${MINOR}.${SOMICRO}"
install_symlink "${MINOR}" "${MICRO}" "${LIBDIR}"
install_symlink "${MAJOR}" "${MINOR}" "${LIBDIR}"
install_symlink "${BASE}" "${MAJOR}" "${LIBDIR}"
MICRO="${MAJOR}.${SOMICRO}"
install_symlink "${BASE}" "${MICRO}" "${LIBDIR}"
# install header
echo "Installing header file '${libiso8601_HEADER}' into ${INCLUDEDIR}"
@ -29,12 +26,12 @@ do_cmd_redir "${CONFFILE}" sed \
-e "s,@VERSION@,${VERSION}," \
-e "s,@DEP_CFLAGS@,${libiso8601_DEP_CFLAGS}," \
-e "s,@DEP_LIBS@,${libiso8601_DEP_LIBS}," \
-e "s,@LIB_DIR@,${FINALLIBDIR}," \
-e "s,@INCLUDE_DIR@,${FINALINCLUDEDIR}," \
-e "s,@LIB_DIR@,${LIBDIR}," \
-e "s,@INCLUDE_DIR@,${INCLUDEDIR}," \
src/libiso8601/config-script
do_cmd chmod 0755 "${CONFFILE}"
print_success "Done"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -11,7 +11,7 @@ then
libiso8601_BASE=libiso8601
source src/libiso8601/soversion
libiso8601="obj/${libiso8601_BASE}.so.${SOMAJOR}.${SOMINOR}.${SOMICRO}"
libiso8601="obj/${libiso8601_BASE}.so.${SOMAJOR}.${SOMICRO}"
libiso8601_DEP_CFLAGS=""
libiso8601_DEP_LIBS="-lrt"
SO_EXTRA="${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} -lc"
@ -34,7 +34,7 @@ then
then
echo " Compiling"
SONAME="${libiso8601_BASE}.so.${SOMAJOR}.${SOMINOR}"
SONAME="${libiso8601_BASE}.so.${SOMAJOR}"
do_cmd ${CC} ${CFLAGS} -Iobj -shared -fpic -o "${libiso8601}" \
-Wl,-soname,${SONAME} \
${SRC} ${SO_EXTRA} || return 1
@ -52,4 +52,4 @@ then
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -18,4 +18,4 @@ then
MONOLITHIC_DOC="${MONOLITHIC_DOC} ${HDR}"
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -94,5 +94,5 @@ true
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;

View File

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

View File

@ -1,3 +1,3 @@
source src/tests/build.tests
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -6,7 +6,7 @@ build_target libiso8601 || return 1
if [ -z ${tests_BUILT} ]
then
LIBS="${libiso8601} "
LIBS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} "
EXTRAS="-D_GNU_SOURCE"
echo "Building test programs..."
@ -45,4 +45,4 @@ then
fi
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4
# vim: syntax=sh:expandtab:ts=4:sw=4

View File

@ -10,8 +10,8 @@
# VERSION contains the full version number of the library, which is
# expected to be in 'major.minor.micro' format.
VERMAJOR=0
VERMINOR=2
VERMICRO=3
VERMINOR=3
VERMICRO=0
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4