From 7a5f30bfcde937a0e0679c2c70b640aaadc106cd Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Tue, 15 Nov 2011 16:46:53 +0000 Subject: [PATCH] Update build system --- make.sh | 1 - run-test.sh | 16 ++++++++-------- scripts/.gitignore | 1 + scripts/functions.sh | 7 +++---- scripts/paths | 7 +++---- src/docs/build.docs | 1 - src/docs/build.install-docs | 1 - src/isodate/build.app | 6 ++---- src/isodate/build.install-app | 1 - src/isodate/build.monolithic | 1 - src/libiso8601/build.install-lib | 1 - src/libiso8601/build.lib | 5 +++-- src/libiso8601/build.monolithic | 1 - src/libiso8601/config-script | 1 - src/libiso8601/soversion | 6 +++--- src/setisodate/build.app | 6 ++---- src/setisodate/build.install-app | 1 - src/setisodate/build.monolithic | 1 - src/tests/build.default | 2 -- src/tests/build.tests | 10 ++-------- src/tests/template | 16 +++++++++------- version | 9 ++++----- 22 files changed, 40 insertions(+), 61 deletions(-) diff --git a/make.sh b/make.sh index 7d11652..343e4b8 100755 --- a/make.sh +++ b/make.sh @@ -292,5 +292,4 @@ done exit 0 -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: expandtab:ts=4:sw=4 diff --git a/run-test.sh b/run-test.sh index cb337f2..cf2eb87 100755 --- a/run-test.sh +++ b/run-test.sh @@ -1,9 +1,9 @@ #!/bin/bash # libiso8601/test.sh -# -# (c)2009, Laurence Withers, . -# Released under the GNU GPLv3. See file COPYING or -# http://www.gnu.org/copyleft/gpl.html for details. +# +# Copyright: ©2009–2011, Güralp Systems Ltd. +# Author: Laurence Withers +# License: GPLv3 # # Running this script on its own will display a summary of all the @@ -21,7 +21,7 @@ run_test() { return 1 fi - LD_LIBRARY_PATH="obj" "${EXE}" "$@" || return 1 + LD_LIBRARY_PATH="obj:${LD_LIBRARY_PATH}" "${EXE}" "$@" || return 1 return 0 } @@ -36,11 +36,12 @@ print_tests() { [ -x "${EXE}" ] || continue NAME="$(echo "${EXE}" | sed 's,obj/tests/,,')" echo -ne "${NAME}\t" - LD_LIBRARY_PATH="obj" "${EXE}" --print-summary + LD_LIBRARY_PATH="obj:${LD_LIBRARY_PATH}" "${EXE}" --print-summary done } + # Main script if [ $# -eq 0 ] then @@ -48,7 +49,6 @@ then exit 0 fi -run_test $* +run_test "$@" -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: expandtab:ts=4:sw=4 diff --git a/scripts/.gitignore b/scripts/.gitignore index edcbbeb..b9fcf56 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -7,6 +7,7 @@ build.docs.none build.files.none build.firmware.gpasm build.firmware.sdcc +build.header.c build.lib.c build.lib.c++ build.make.none diff --git a/scripts/functions.sh b/scripts/functions.sh index df3e35f..583d2bd 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -1,8 +1,8 @@ # libiso8601/scripts/functions.sh # -# (c)2007, Laurence Withers, . -# Released under the GNU GPLv3. See file COPYING or -# http://www.gnu.org/copyleft/gpl.html for details. +# Copyright: ©2007–2011, Güralp Systems Ltd. +# Author: Laurence Withers, +# License: GPLv3 # # Common functions @@ -63,5 +63,4 @@ do_cmd_redir() { fi } -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: expandtab:ts=4:sw=4 diff --git a/scripts/paths b/scripts/paths index 0975fc2..76be405 100644 --- a/scripts/paths +++ b/scripts/paths @@ -1,8 +1,8 @@ # libiso8601/scripts/paths # -# (c)2007, Laurence Withers, . -# Released under the GNU GPLv3. See file COPYING or -# http://www.gnu.org/copyleft/gpl.html for details. +# Copyright: ©2011, Güralp Systems Ltd. +# Author: Laurence Withers, +# License: GPLv3 # # Default path setup. Not meant for editing; use environment variables # to override values if needed. @@ -60,5 +60,4 @@ fi [ -z "${WEBDIR}" ] && WEBDIR="${SRVDIR}/http" [ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin" -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/docs/build.docs b/src/docs/build.docs index 98d0570..d4494bf 100644 --- a/src/docs/build.docs +++ b/src/docs/build.docs @@ -39,5 +39,4 @@ then docs_BUILT=1 fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/docs/build.install-docs b/src/docs/build.install-docs index 28f5f18..b07c940 100644 --- a/src/docs/build.install-docs +++ b/src/docs/build.install-docs @@ -17,5 +17,4 @@ do done print_success "Documentation installed" -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/isodate/build.app b/src/isodate/build.app index 071ec61..b4eb742 100644 --- a/src/isodate/build.app +++ b/src/isodate/build.app @@ -3,12 +3,11 @@ # isodate_BUILT # -build_target libiso8601 - if [ -z ${isodate_BUILT} ] then isodate="obj/isodate" - EXTRAS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}" + EXTRAS="-std=gnu99 -D_GNU_SOURCE -DAPP_NAME=\"isodate\" \ + ${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}" echo "Building application ${isodate}..." @@ -39,5 +38,4 @@ then fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/isodate/build.install-app b/src/isodate/build.install-app index b33660a..728fd40 100644 --- a/src/isodate/build.install-app +++ b/src/isodate/build.install-app @@ -8,5 +8,4 @@ echo "Installing binaries into '${BINDIR}'" install_file "${isodate}" "${BINDIR}" 0755 || return 1 print_success "Done" -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/isodate/build.monolithic b/src/isodate/build.monolithic index a4bfc00..5dce587 100644 --- a/src/isodate/build.monolithic +++ b/src/isodate/build.monolithic @@ -14,5 +14,4 @@ then MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}" fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/libiso8601/build.install-lib b/src/libiso8601/build.install-lib index 3768c51..f3a9e35 100644 --- a/src/libiso8601/build.install-lib +++ b/src/libiso8601/build.install-lib @@ -34,5 +34,4 @@ do_cmd_redir "${CONFFILE}" sed \ do_cmd chmod 0755 "${CONFFILE}" print_success "Done" -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/libiso8601/build.lib b/src/libiso8601/build.lib index 3937758..aedcfef 100644 --- a/src/libiso8601/build.lib +++ b/src/libiso8601/build.lib @@ -14,7 +14,9 @@ then libiso8601="obj/${libiso8601_BASE}.so.${SOMAJOR}.${SOMICRO}" libiso8601_DEP_CFLAGS="" libiso8601_DEP_LIBS="-lrt" - SO_EXTRA="-std=gnu99 -D_GNU_SOURCE -DDEFAULT_LEAP_TABLE=\"${DEFAULT_LEAP_TABLE}\" ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} -lc" + SO_EXTRA="${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} -lc \ + -D_GNU_SOURCE -std=gnu99 \ + -DDEFAULT_LEAP_TABLE=\"${DEFAULT_LEAP_TABLE}\"" echo "Building library ${libiso8601}..." @@ -52,5 +54,4 @@ then libiso8601_HEADER=${HDR} fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/libiso8601/build.monolithic b/src/libiso8601/build.monolithic index 4c8e7f8..4d8f158 100644 --- a/src/libiso8601/build.monolithic +++ b/src/libiso8601/build.monolithic @@ -17,5 +17,4 @@ then libiso8601_MONOLITHIC=1 MONOLITHIC_DOC="${MONOLITHIC_DOC} ${HDR}" fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/libiso8601/config-script b/src/libiso8601/config-script index 91ed2d4..3a81fae 100644 --- a/src/libiso8601/config-script +++ b/src/libiso8601/config-script @@ -95,4 +95,3 @@ true # vim: syntax=sh:expandtab:ts=4:sw=4 -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; diff --git a/src/libiso8601/soversion b/src/libiso8601/soversion index 06bbd00..058998c 100644 --- a/src/libiso8601/soversion +++ b/src/libiso8601/soversion @@ -1,8 +1,8 @@ # libiso8601/src/libiso8601/soversion # -# (c)2007, Laurence Withers, . -# Released under the GNU GPLv3. See file COPYING or -# http://www.gnu.org/copyleft/gpl.html for details. +# Copyright: ©2007–2011, Güralp Systems Ltd. +# Author: Laurence Withers +# License: GPLv3 # diff --git a/src/setisodate/build.app b/src/setisodate/build.app index 7ba2cc1..77e4889 100644 --- a/src/setisodate/build.app +++ b/src/setisodate/build.app @@ -3,12 +3,11 @@ # setisodate_BUILT # -build_target libiso8601 - if [ -z ${setisodate_BUILT} ] then setisodate="obj/setisodate" - EXTRAS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}" + EXTRAS="-std=gnu99 -D_GNU_SOURCE -DAPP_NAME=\"setisodate\" \ + ${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS}" echo "Building application ${setisodate}..." @@ -39,5 +38,4 @@ then fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/setisodate/build.install-app b/src/setisodate/build.install-app index 602f270..213198d 100644 --- a/src/setisodate/build.install-app +++ b/src/setisodate/build.install-app @@ -8,5 +8,4 @@ echo "Installing binaries into '${SBINDIR}'" install_file "${setisodate}" "${SBINDIR}" 0755 || return 1 print_success "Done" -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/setisodate/build.monolithic b/src/setisodate/build.monolithic index 11a2333..849b524 100644 --- a/src/setisodate/build.monolithic +++ b/src/setisodate/build.monolithic @@ -14,5 +14,4 @@ then MONOLITHIC_DOC="${MONOLITHIC_DOC} ${SRC}" fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/tests/build.default b/src/tests/build.default index 1f0ae49..1ae62a2 100644 --- a/src/tests/build.default +++ b/src/tests/build.default @@ -1,3 +1 @@ source src/tests/build.tests -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; -# vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/tests/build.tests b/src/tests/build.tests index 2a31b3b..bfa8f8a 100644 --- a/src/tests/build.tests +++ b/src/tests/build.tests @@ -7,7 +7,7 @@ build_target libiso8601 || return 1 if [ -z ${tests_BUILT} ] then LIBS="${libiso8601} ${libiso8601_DEP_CFLAGS} ${libiso8601_DEP_LIBS} " - EXTRAS="-D_GNU_SOURCE" + EXTRAS="-lm" echo "Building test programs..." do_cmd mkdir -p obj/tests || return 1 @@ -25,14 +25,9 @@ then fi done - case "${TEST}" in - obj/tests/manip) TEST_EXTRAS="-lm" ;; - *) TEST_EXTRAS="" ;; - esac - if [ ${MODIFIED} -ne 0 ] then - do_cmd ${CC} -Iobj ${CFLAGS} -o ${TEST} ${SRC} ${LIBS} ${EXTRAS} ${TEST_EXTRAS} || return 1 + do_cmd ${CC} -Iobj ${CFLAGS} -o ${TEST} ${SRC} ${LIBS} ${EXTRAS} || return 1 print_success "Built ${TEST}" else print_success "${TEST} is up to date" @@ -44,5 +39,4 @@ then tests_BUILT=1 fi -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: syntax=sh:expandtab:ts=4:sw=4 diff --git a/src/tests/template b/src/tests/template index 6d05ac7..82fc2bb 100644 --- a/src/tests/template +++ b/src/tests/template @@ -1,9 +1,9 @@ -/* libiso8601/src/tests/???.c +/* libiso8601/src/tests/xxx.c * - * (c)2007, Laurence Withers, . - * Released under the GNU GPLv3. See file COPYING or - * http://www.gnu.org/copyleft/gpl.html for details. -*/ + * Copyright: ©2007–2011, Güralp Systems Ltd. + * Author: Laurence Withers + * License: GPLv3 + */ #include "iso8601.h" @@ -12,7 +12,8 @@ -int main(int argc, char* argv[]) +int +main(int argc, char* argv[]) { int ret = 0; @@ -30,7 +31,8 @@ int main(int argc, char* argv[]) return ret; } + + /* options for text editors -kate: replace-trailing-space-save true; space-indent true; tab-width 4; vim: expandtab:ts=4:sw=4 */ diff --git a/version b/version index eabca08..4218b08 100644 --- a/version +++ b/version @@ -1,8 +1,8 @@ # libiso8601/version -# -# (c)2007, Laurence Withers, . -# Released under the GNU GPLv3. See file COPYING or -# http://www.gnu.org/copyleft/gpl.html for details. +# +# Copyright: ©2007–2011, Güralp Systems Ltd. +# Author: Laurence Withers +# License: GPLv3 # @@ -13,5 +13,4 @@ VERMAJOR=0 VERMINOR=3 VERMICRO=11 -# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # vim: expandtab:ts=4:sw=4:syntax=sh