From e9d49fe23d15597dde4aecec206afc84c9996f0d Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Sun, 18 May 2008 22:14:13 +0000 Subject: [PATCH] * dune.module isn't parsed by m4 anymore. * all dependecies are explicitely added to dependencies.m4 * dependencies.m4 is used by configure [[Imported from SVN: r5200]] --- bin/dune-autogen | 11 +++++----- bin/dunecontrol | 16 --------------- m4/dune_all.m4 | 53 ++++-------------------------------------------- 3 files changed, 9 insertions(+), 71 deletions(-) diff --git a/bin/dune-autogen b/bin/dune-autogen index 3f6140e0e..e938769b0 100755 --- a/bin/dune-autogen +++ b/bin/dune-autogen @@ -47,6 +47,7 @@ for OPT in "$@"; do if test -d "$OPT/m4"; then echo "... merging $OPT/m4 into dune-all.m4" cat "$OPT/m4/"*.m4 >> dune-all.m4 + ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $OPT/m4" fi if test -f "$OPT/dune-common.pc.in" ; then # if test \( -d "$OPT/am" \) -a ! \( -h "$OPT/am" \) ; then @@ -94,17 +95,15 @@ echo "--> libtoolize..." # PITA when you want to upgrade libtool, thus I'm setting --force libtoolize --force -# merge m4 files -if [ -d m4 ]; then - echo "--> collect m4 files" - cat m4/*.m4 > $name.m4 -fi +# writing privat m4 file +echo -n "--> " +dunecontrol --only=$name m4create # prepare everything echo "--> aclocal..." rm -f aclocal.m4 rm -rf autom4te.cache -aclocal$AMVERSION -I . +aclocal$AMVERSION -I. $ACLOCAL_FLAGS # create a link to the dune-common am directory if [ "$name" != "dune-common" ]; then diff --git a/bin/dunecontrol b/bin/dunecontrol index c4a248b8b..27bb6f9ab 100755 --- a/bin/dunecontrol +++ b/bin/dunecontrol @@ -521,22 +521,6 @@ case "$command" in eval "print_module_list ' ' $MODULES" echo > /dev/stderr ;; - m4depends) - find_modules_in_path - if test "x$SEARCH_MODULES" != "x"; then - MODULES=$SEARCH_MODULES - fi - sort_dependencies $MODULES - eval "print_module_list ',' $MODULES" - ;; - m4suggests) - find_modules_in_path - if test "x$SEARCH_MODULES" != "x"; then - MODULES=$SEARCH_MODULES - fi - sort_suggestions $MODULES - eval "print_module_list ',' $MODULES" - ;; export) create_module_list DUNE_CONTROL_PATH="" diff --git a/m4/dune_all.m4 b/m4/dune_all.m4 index e0edb3fa8..c9fa72f6e 100644 --- a/m4/dune_all.m4 +++ b/m4/dune_all.m4 @@ -1,4 +1,4 @@ -# $Id$ +# $Id: dune_all.m4 5164 2008-04-21 14:08:28Z christi $ # this meta-check calls everything needed for Dune to work and all # possible components. Applications should use this so that @@ -16,53 +16,11 @@ # In addition to DUNE_CHECK_ALL it run some additional tests # and sets up some things needed for modules (i.e. the 'dune' symlink) -# m4_define([DUNE_GET_MODULE_VAR],[m4_esyscmd([grep ^Version: dune.module | cut -d ':' -f 2 | tr -d '\n '])]) - -m4_define([DUNE_PARSE_MODULE_FILE],[ - m4_define([DUNE_MOD_VERSION], - [m4_esyscmd([grep ^Version: dune.module | cut -d ':' -f 2 | tr -d '\n '])]) - m4_define([DUNE_MOD_NAME], - [m4_esyscmd([grep ^Module: dune.module | cut -d ':' -f 2 | tr -d '\n '])]) - m4_define([DUNE_MAINTAINER_NAME], - [m4_esyscmd([grep ^Maintainer: dune.module | cut -d ':' -f 2 | tr -d '\n '])]) -]) - -m4_define([DUNE_AC_INIT],[ - DUNE_PARSE_MODULE_FILE - AC_INIT(DUNE_MOD_NAME, DUNE_MOD_VERSION, DUNE_MAINTAINER_NAME) - # don't build shared libs per default, this is way better for debugging... - m4_ifdef([LT_INIT], - [LT_INIT], - [AC_DEFUN([LT_OUTPUT])]) - AC_DISABLE_SHARED -]) - -AC_DEFUN([DUNE_CHECK_DEPENDENCIES], [ - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - AC_PROG_LIBTOOL - AC_PROG_CXX - LT_OUTPUT - DUNE_PARSE_MODULE_FILE - AC_SUBST([DUNE[]_MOD_VERSION], [DUNE_MOD_VERSION]) - AC_SUBST([DUNE[]_MOD_NAME], [DUNE_MOD_NAME]) - AC_SUBST(ALL_PKG_LIBS, "$LIBS $DUNE_PKG_LIBS") - [## invoke checks for] DUNE_MOD_NAME - m4_pushdef([_dune_module], [m4_translit(DUNE_MOD_NAME, [-], [_])]) - m4_pushdef([_DUNE_MODULE], [m4_toupper(_dune_module)]) - m4_ifdef(_DUNE_MODULE[]_CHECKS,_DUNE_MODULE[]_CHECKS) - m4_popdef([_dune_module]) - m4_popdef([_DUNE_MODULE]) - [## invoke checks] DUNE_MOD_NAME depends on - DUNE_MODULE_DEPENDENCIES(DUNE_MOD_NAME) - DUNE_MODULE_SUGGESTIONS(DUNE_MOD_NAME) -]) - AC_DEFUN([DUNE_CHECK_ALL],[ # doxygen and latex take a lot of time... AC_REQUIRE([DUNE_DOCUMENTATION]) AC_REQUIRE([DUNE_WEB]) - AC_ARG_ENABLE(enabledist, AC_HELP_STRING([--enable-dist], [go into create-tarballs-mode [[default=no]]]), @@ -74,8 +32,9 @@ AC_DEFUN([DUNE_CHECK_ALL],[ AM_CONDITIONAL(DUNEWEB, false) fi - dnl check all components - AC_REQUIRE([DUNE_CHECK_DEPENDENCIES]) + dnl check dependencies of this module + dnl this test is autogenerated for each module + AC_REQUIRE([DUNE_CHECK_MOD_DEPENDENCIES]) # convenience-variables if every found package should be used AC_SUBST(ALL_PKG_LIBS, "$LIBS $DUNE_PKG_LIBS") @@ -120,8 +79,6 @@ AC_DEFUN([DUNE_SUMMARY_ALL],[ ]) AC_DEFUN([DUNE_CHECK_ALL_M],[ - AC_LANG_PUSH([C++]) - AC_REQUIRE([DUNE_SYMLINK]) # special settings for check-log @@ -146,6 +103,4 @@ AC_DEFUN([DUNE_CHECK_ALL_M],[ AC_REQUIRE([DUNE_CHECK_ALL]) AC_REQUIRE([DUNE_DEV_MODE]) AC_REQUIRE([DUNE_PKG_CONFIG_REQUIRES]) - - AC_LANG_POP([C++]) ]) -- GitLab