Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
da2110da20 | |
![]() |
62cd909840 | |
![]() |
b6a73e2ea2 | |
![]() |
fd6f38c18f | |
![]() |
c8a064c25d | |
![]() |
27be2dc931 |
6
README
6
README
|
@ -1,6 +1,6 @@
|
||||||
libiso8601
|
libiso8601
|
||||||
========================================================================
|
========================================================================
|
||||||
(c)2006, Laurence Withers, <l@lwithers.me.uk>.
|
(c)2007, Laurence Withers, <l@lwithers.me.uk>.
|
||||||
Released under the GNU GPLv2. See file COPYING or
|
Released under the GNU GPLv2. See file COPYING or
|
||||||
http://www.gnu.org/copyleft/gpl.html for details.
|
http://www.gnu.org/copyleft/gpl.html for details.
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ Really Quick Instructions
|
||||||
To build: ./make.sh
|
To build: ./make.sh
|
||||||
To install: ./make.sh install
|
To install: ./make.sh install
|
||||||
|
|
||||||
You might want to edit 'config' first.
|
You might want to edit 'config' first. You might also want to set
|
||||||
|
'INSTALL_PREFIX', which is prepended onto the destination of any
|
||||||
|
installed file.
|
||||||
|
|
||||||
@TODO@
|
@TODO@
|
||||||
|
|
2
config
2
config
|
@ -2,7 +2,7 @@
|
||||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||||
# vim: expandtab:ts=4:sw=4
|
# vim: expandtab:ts=4:sw=4
|
||||||
#
|
#
|
||||||
# (c)2006, Laurence Withers, <l@lwithers.me.uk>.
|
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
|
||||||
# Released under the GNU GPLv2. See file COPYING or
|
# Released under the GNU GPLv2. See file COPYING or
|
||||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||||
#
|
#
|
||||||
|
|
40
make.sh
40
make.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# libiso8601/make.sh
|
# libiso8601/make.sh
|
||||||
#
|
#
|
||||||
# (c)2006, Laurence Withers, <l@lwithers.me.uk>.
|
# (c)2006-2007, Laurence Withers, <l@lwithers.me.uk>.
|
||||||
# Released under the GNU GPLv2. See file COPYING or
|
# Released under the GNU GPLv2. See file COPYING or
|
||||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||||
#
|
#
|
||||||
|
@ -48,6 +48,8 @@ OUTPUT_DIRS="obj html"
|
||||||
# MONOLITHIC_TESTS if any file mentioned in this list is newer
|
# MONOLITHIC_TESTS if any file mentioned in this list is newer
|
||||||
# than the output file, then we recreate it
|
# than the output file, then we recreate it
|
||||||
# MONOLITHIC_SOURCE a list (in order) of the source files
|
# MONOLITHIC_SOURCE a list (in order) of the source files
|
||||||
|
# MONOLITHIC_OPTIONS will #define the options to match the respective
|
||||||
|
# environment variables.
|
||||||
#
|
#
|
||||||
# Recognised formats are:
|
# Recognised formats are:
|
||||||
# none no special processing happens before each file
|
# none no special processing happens before each file
|
||||||
|
@ -68,13 +70,16 @@ make_monolithic() {
|
||||||
# extract options
|
# extract options
|
||||||
HASHLINE=0
|
HASHLINE=0
|
||||||
VERDEFINE=0
|
VERDEFINE=0
|
||||||
|
HASHDEFINE=0
|
||||||
if [ "$2" == "C" ]
|
if [ "$2" == "C" ]
|
||||||
then
|
then
|
||||||
HASHLINE=1
|
HASHLINE=1
|
||||||
VERDEFINE=1
|
VERDEFINE=1
|
||||||
|
HASHDEFINE=1
|
||||||
elif [ "$2" == "Ch" ]
|
elif [ "$2" == "Ch" ]
|
||||||
then
|
then
|
||||||
HASHLINE=1
|
HASHLINE=1
|
||||||
|
HASHDEFINE=1
|
||||||
elif [ "$2" == "none" ]
|
elif [ "$2" == "none" ]
|
||||||
then
|
then
|
||||||
HASHLINE=0 # dummy command
|
HASHLINE=0 # dummy command
|
||||||
|
@ -115,6 +120,14 @@ make_monolithic() {
|
||||||
do_cmd_redir ${MONOLITHIC_OUT} echo "#define VEREXTRA \"${VEREXTRA}\"" || return 1
|
do_cmd_redir ${MONOLITHIC_OUT} echo "#define VEREXTRA \"${VEREXTRA}\"" || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${HASHDEFINE} -ne 0 ]
|
||||||
|
then
|
||||||
|
for opt in ${MONOLITHIC_OPTIONS}
|
||||||
|
do
|
||||||
|
do_cmd_redir ${MONOLITHIC_OUT} echo "#define ${opt} ${!opt}" || return 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
for FILE in ${MONOLITHIC_SOURCE}
|
for FILE in ${MONOLITHIC_SOURCE}
|
||||||
do
|
do
|
||||||
if [ ${HASHLINE} -ne 0 ]
|
if [ ${HASHLINE} -ne 0 ]
|
||||||
|
@ -142,6 +155,10 @@ build_dir_tree() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
build_dir_tree_recurse "${INSTALL_PREFIX}$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
build_dir_tree_recurse() {
|
||||||
local DIR="$1"
|
local DIR="$1"
|
||||||
|
|
||||||
# if the directory already exists, return success
|
# if the directory already exists, return success
|
||||||
|
@ -160,8 +177,9 @@ build_dir_tree() {
|
||||||
mkdir "${DIR}" >& /dev/null
|
mkdir "${DIR}" >& /dev/null
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
build_dir_tree $(dirname "${DIR}") || return 1
|
build_dir_tree_recurse $(dirname "${DIR}") || return 1
|
||||||
mkdir "${DIR}"
|
echo " Creating directory '${DIR}'"
|
||||||
|
do_cmd mkdir "${DIR}"
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
print_failure "Failed to create directory '${DIR}'"
|
print_failure "Failed to create directory '${DIR}'"
|
||||||
|
@ -180,10 +198,10 @@ build_dir_tree() {
|
||||||
# second is the destination. The third is the octal mode.
|
# second is the destination. The third is the octal mode.
|
||||||
install_file() {
|
install_file() {
|
||||||
# figure out if $2 is a directory or not
|
# figure out if $2 is a directory or not
|
||||||
DEST_FILE="$2"
|
DEST_FILE="${INSTALL_PREFIX}$2"
|
||||||
[ -d "$2" ] && DEST_FILE="$2/$(basename $1)"
|
[ -d "${DEST_FILE}" ] && DEST_FILE="${INSTALL_PREFIX}$2/$(basename $1)"
|
||||||
|
|
||||||
echo " Installing: '$1' -> '$2'"
|
echo " Installing: '$1' -> '${DESTFILE}'"
|
||||||
do_cmd cp -fP "$1" "${DEST_FILE}" || return 1
|
do_cmd cp -fP "$1" "${DEST_FILE}" || return 1
|
||||||
do_cmd chmod "$3" "${DEST_FILE}" || return 1
|
do_cmd chmod "$3" "${DEST_FILE}" || return 1
|
||||||
|
|
||||||
|
@ -195,10 +213,10 @@ install_file() {
|
||||||
# This will install a header file. It is basically similar to
|
# This will install a header file. It is basically similar to
|
||||||
# install_file(), only we strip out the #line directives.
|
# install_file(), only we strip out the #line directives.
|
||||||
install_header() {
|
install_header() {
|
||||||
DEST_FILE="$2"
|
DEST_FILE="${INSTALL_PREFIX}$2"
|
||||||
[ -d "$2" ] && DEST_FILE="$2/$(basename $1)"
|
[ -d "${DEST_FILE}" ] && DEST_FILE="${INSTALL_PREFIX}$2/$(basename $1)"
|
||||||
|
|
||||||
echo " Installing header: '$1' -> '$2'"
|
echo " Installing: '$1' -> '${DESTFILE}'"
|
||||||
do_cmd rm -f ${DEST_FILE} || exit 1
|
do_cmd rm -f ${DEST_FILE} || exit 1
|
||||||
do_cmd_redir ${DEST_FILE} sed -e "s,^#line.*,," $1 || exit 1
|
do_cmd_redir ${DEST_FILE} sed -e "s,^#line.*,," $1 || exit 1
|
||||||
do_cmd chmod "$3" "${DEST_FILE}" || return 1
|
do_cmd chmod "$3" "${DEST_FILE}" || return 1
|
||||||
|
@ -212,9 +230,9 @@ install_header() {
|
||||||
# second the symlink's source filename, and the third is the directory
|
# second the symlink's source filename, and the third is the directory
|
||||||
# in which to create the symlink.
|
# in which to create the symlink.
|
||||||
install_symlink() {
|
install_symlink() {
|
||||||
echo " Installing symlink: '$3/$2' -> '$1'"
|
echo " Installing symlink: '$3/$2' -> '${INSTALL_PREFIX}$1'"
|
||||||
|
|
||||||
( do_cmd cd $3; ln -sf $2 $1 ) || return 1
|
( do_cmd cd $3; ln -sf $2 ${INSTALL_PREFIX}$1 ) || return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
build.app.c
|
build.app.c
|
||||||
build.app.c++
|
build.app.c++
|
||||||
build.app.c++-qt
|
build.app.c++-qt
|
||||||
|
build.app.sh
|
||||||
build.docs.doxygen
|
build.docs.doxygen
|
||||||
build.files.none
|
build.files.none
|
||||||
build.firmware.gpasm
|
build.firmware.gpasm
|
||||||
build.firmware.sdcc
|
build.firmware.sdcc
|
||||||
build.lib.c
|
build.lib.c
|
||||||
build.lib.c++
|
build.lib.c++
|
||||||
|
build.module.c
|
||||||
build.tests.c
|
build.tests.c
|
||||||
build.tests.c++
|
build.tests.c++
|
||||||
module-create.sh
|
module-create.sh
|
||||||
|
|
|
@ -22,7 +22,7 @@ install_header ${libiso8601_HEADER} ${INCLUDEDIR} 0644 || return 1
|
||||||
|
|
||||||
# install config script
|
# install config script
|
||||||
echo "Installing config script into ${BINDIR}"
|
echo "Installing config script into ${BINDIR}"
|
||||||
CONFFILE="${BINDIR}/libiso8601-config"
|
CONFFILE="${INSTALL_PREFIX}${BINDIR}/libiso8601-config"
|
||||||
|
|
||||||
do_cmd rm -f "${CONFFILE}"
|
do_cmd rm -f "${CONFFILE}"
|
||||||
do_cmd_redir "${CONFFILE}" sed \
|
do_cmd_redir "${CONFFILE}" sed \
|
||||||
|
|
|
@ -90,6 +90,7 @@ done
|
||||||
[ "${echo_exec_prefix}" == "yes" ] && echo "${exec_prefix}"
|
[ "${echo_exec_prefix}" == "yes" ] && echo "${exec_prefix}"
|
||||||
[ "${echo_cflags}" == "yes" ] && echo "${dep_cflags} ${includes}"
|
[ "${echo_cflags}" == "yes" ] && echo "${dep_cflags} ${includes}"
|
||||||
[ "${echo_libs}" == "yes" ] && echo "${dep_libs} -L${lib_dir} -liso8601"
|
[ "${echo_libs}" == "yes" ] && echo "${dep_libs} -L${lib_dir} -liso8601"
|
||||||
|
true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# libiso8601/src/libiso8601/soversion
|
# libiso8601/src/libiso8601/soversion
|
||||||
#
|
#
|
||||||
# (c)2006, Laurence Withers, <l@lwithers.me.uk>.
|
# (c)2007, Laurence Withers, <l@lwithers.me.uk>.
|
||||||
# Released under the GNU GPLv2. See file COPYING or
|
# Released under the GNU GPLv2. See file COPYING or
|
||||||
# http://www.gnu.org/copyleft/gpl.html for details.
|
# http://www.gnu.org/copyleft/gpl.html for details.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* libiso8601/src/tests/???.c
|
/* libiso8601/src/tests/???.c
|
||||||
*
|
*
|
||||||
* (c)2006, Laurence Withers, <l@lwithers.me.uk>.
|
* (c)2007, Laurence Withers, <l@lwithers.me.uk>.
|
||||||
* Released under the GNU GPLv2. See file COPYING or
|
* Released under the GNU GPLv2. See file COPYING or
|
||||||
* http://www.gnu.org/copyleft/gpl.html for details.
|
* http://www.gnu.org/copyleft/gpl.html for details.
|
||||||
*/
|
*/
|
||||||
|
|
2
version
2
version
|
@ -12,7 +12,7 @@
|
||||||
# suffixed with a string.
|
# suffixed with a string.
|
||||||
VERMAJOR=0
|
VERMAJOR=0
|
||||||
VERMINOR=0
|
VERMINOR=0
|
||||||
VERMICRO=2
|
VERMICRO=5
|
||||||
VEREXTRA=""
|
VEREXTRA=""
|
||||||
|
|
||||||
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||||
|
|
Loading…
Reference in New Issue