From 6583fd29be8a0591af8326e799c48fa3778a0aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 6 May 2015 14:51:14 +0000 Subject: [PATCH] added doxygen-webtester.sed do generate doxygen from webtester files --- ChangeLog | 5 +++ ax_init_standard_project.m4 | 5 +++ bootstrap.sh | 83 +++++++++++++++++++++++------------ configure.ac | 1 + makefile.am | 4 +- scripts/doxygen-webtester.sed | 44 +++++++++++++++++++ scripts/example.wt | 13 ++++++ scripts/makefile.am | 9 ++++ 8 files changed, 133 insertions(+), 31 deletions(-) create mode 100755 scripts/doxygen-webtester.sed create mode 100644 scripts/example.wt create mode 100644 scripts/makefile.am diff --git a/ChangeLog b/ChangeLog index afc19e2..a9f3e8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-05-06 07:56 marc + + * ChangeLog, debian/.dirs, debian/.install, debian/webtester.dirs, + debian/webtester.install: no need for install and dirs in debian + 2015-05-05 20:31 marc * ax_init_standard_project.m4, bootstrap.sh, configure.ac, debian, diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 56aeb31..c86e606 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -283,6 +283,11 @@ rpm: dist EOF ]) +# use this in configure.ac to support scripts, e.g. bash scripts +AC_DEFUN([AX_USE_SCRIPTS], [ + AC_CONFIG_FILES([scripts/makefile]) +]) + # use this in configure.ac to support Doxygen documentation generation AC_DEFUN([AX_USE_DOXYGEN], [ AC_CHECK_PROG(have_doxygen, doxygen, yes, no) diff --git a/bootstrap.sh b/bootstrap.sh index fc9831f..24c18e0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,10 +19,18 @@ PROJECT_PATH=$(pwd) DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/} configure=0 +build=0 +overwrite=0 +rebuild=0 while test $# -gt 0; do case "$1" in (--configure|-c) configure=1;; - (--version|-v) echo "$Id$"; exit;; + (--build|-b) configure=1; build=1;; + (--overwrite|-o) overwrite=1;; + (--rebuild|-r) rebuild=1;; + (--version|-v) + echo "$Id$"; + exit;; (--help|-h) less <" - and run ${MY_NAME} again. +REBUILDING FILES + + To rebuild all these files, just run "${MY_NAME} -o". You can also + remove and rebuild a single file by removing it from subversion, + just call "svn rm " and "${MY_NAME}" to rebuild file "". FILES TO EDIT @@ -128,8 +143,8 @@ FILES TO EDIT FILE DEPENDENCIES - You should rebuild (remove and run (see above) the files, whenever - you change the configuration a dependent, i.e.: + You should rebuild (see above) the files, whenever you change the + configuration a dependent, i.e.: * test/makefile.am depends on AX_USE_LIBTOOL * doc/doxyfile.in depends on AX_BUILD_EXAMPLES @@ -162,8 +177,9 @@ FILES number. The following macros are supported: * Enable C++: AX_USE_CXX * Enable LibTool library creation: AX_USE_LIBTOOL + * Enable Scripts: AX_USE_SCRIPTS * Enable Doxygen documentation generation: AX_USE_DOXYGEN - * Enable debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING + * Enable Debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING * Not yet implemented: AX_USE_RPM_PACKAGING * Enable C++ testing using CppUnit: AX_USE_CPPUNIT * Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES @@ -198,7 +214,7 @@ EOF done -HEADER='## @id $Id$ +HEADER='## @id '"\$Id\$"' # # This file has been added by '${MY_NAME}' on '$(date -R)' # Feel free to change it or even remove and rebuild it, up to your needs @@ -247,6 +263,14 @@ checkdir() { fi } +checkfile() { + exists=0 + if test -f "$1"; then + exists=1 + fi + test $exists -eq 1 +} + to() { while test $# -gt 0; do mode="u=rw,g=rw,o=r" @@ -261,7 +285,7 @@ to() { esac shift; done - if test -f "$1"; then # file already exists + if checkfile "$1" && test $rebuild -eq 0; then # file already exists return fi checkdir "$(dirname ${1})" @@ -279,13 +303,18 @@ to() { echo -e " \e[32msuccess\e[0m" fi chmod $mode $1 - run svn add "$1" - run svn propset svn:keywords "Id" "$1" + if test $exists -eq 0; then + run svn add "$1" + run svn propset svn:keywords "Id" "$1" + fi } copy() { - if ! test -f "$1"; then - run cp "${0%/*}/$1" "$1" + if checkfile "$1" && test $overwrite -eq 0; then + return + fi + run cp "${0%/*}/$1" "$1" + if test $exists -eq 0; then run svn add "$1" run svn propset svn:keywords "Id" "$1" fi @@ -321,6 +350,7 @@ AX_INIT_STANDARD_PROJECT # requirements, uncomment, what you need: #AX_USE_CXX #AX_USE_LIBTOOL +#AX_USE_SCRIPTS #AX_USE_DOXYGEN #AX_USE_DEBIAN_PACKAGING #AX_USE_RPM_PACKAGING @@ -342,7 +372,7 @@ echo "${HEADER}" | to --condition AX_USE_CXX src/makefile.am to --condition AX_USE_CXX src/version.hxx <