Mercurial > gnulib
changeset 8079:0951beec5b89
New module description section 'configure.ac-early'.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 04 Feb 2007 19:09:25 +0000 |
parents | 0a080a2d054b |
children | 65b4c7cab50b |
files | ChangeLog gnulib-tool modules/extensions modules/lock |
diffstat | 4 files changed, 46 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Feb 04 16:28:01 2007 +0000 +++ b/ChangeLog Sun Feb 04 19:09:25 2007 +0000 @@ -1,3 +1,11 @@ +2007-02-04 Bruno Haible <bruno@clisp.org> + + New module description section 'configure.ac-early'. + * gnulib-tool (sed_extract_prog): Recognize configure.ac-early. + (func_get_autoconf_early_snippet): New function. + (func_import, func_create_testdir): Use it. Remove special cases for + modules 'extensions' and 'lock'. + 2007-02-04 Bruno Haible <bruno@clisp.org> Make use of gcj-4.3's -fsource and -ftarget option.
--- a/gnulib-tool Sun Feb 04 16:28:01 2007 +0000 +++ b/gnulib-tool Sun Feb 04 19:09:25 2007 +0000 @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2007-02-01 01:52:34 $' +cvsdatestamp='$Date: 2007-02-04 19:09:25 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -890,6 +890,7 @@ s/^Description:[ ]*$// s/^Files:[ ]*$// s/^Depends-on:[ ]*$// + s/^configure\.ac-early:[ ]*$// s/^configure\.ac:[ ]*$// s/^Makefile\.am:[ ]*$// s/^Include:[ ]*$// @@ -939,6 +940,15 @@ sed -n -e "/^Depends-on$sed_extract_prog" < "$lookedup_file" } +# func_get_autoconf_early_snippet module +# Input: +# - local_gnulib_dir from --local-dir +func_get_autoconf_early_snippet () +{ + func_lookup_file "modules/$1" + sed -n -e "/^configure\.ac-early$sed_extract_prog" < "$lookedup_file" +} + # func_get_autoconf_snippet module # Input: # - local_gnulib_dir from --local-dir @@ -2107,12 +2117,13 @@ if grep AC_GNU_SOURCE "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then echo " AC_REQUIRE([AC_GNU_SOURCE])" fi - if grep gl_USE_SYSTEM_EXTENSIONS "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then - echo " AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])" - fi - if grep gl_LOCK "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then - echo " AC_REQUIRE([gl_LOCK_EARLY])" - fi + for module in $modules; do + func_verify_module + if test -n "$module"; then + func_get_autoconf_early_snippet "$module" + fi + done \ + | sed -e '/^$/d;' -e 's/^/ /' echo "])" echo echo "# This macro should be invoked from $configure_ac, in the section" @@ -2478,14 +2489,13 @@ echo "AC_GNU_SOURCE" echo fi - if grep gl_USE_SYSTEM_EXTENSIONS "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then - echo "gl_USE_SYSTEM_EXTENSIONS" - echo - fi - if grep gl_LOCK "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then - echo "gl_LOCK_EARLY" - echo - fi + for module in $modules; do + func_verify_module + if test -n "$module"; then + func_get_autoconf_early_snippet "$module" + fi + done \ + | sed -e '/^$/d;' -e 's/AC_REQUIRE(\[\([^()]*\)\])/\1/' if test "$libtool" = true; then echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])" echo "gl_cond_libtool=true" @@ -2598,14 +2608,13 @@ echo "AC_GNU_SOURCE" echo fi - if grep gl_USE_SYSTEM_EXTENSIONS "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then - echo "gl_USE_SYSTEM_EXTENSIONS" - echo - fi - if grep gl_LOCK "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then - echo "gl_LOCK_EARLY" - echo - fi + for module in $modules; do + func_verify_nontests_module + if test -n "$module"; then + func_get_autoconf_early_snippet "$module" + fi + done \ + | sed -e '/^$/d;' -e 's/AC_REQUIRE(\[\([^()]*\)\])/\1/' if test "$libtool" = true; then echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])" echo "gl_cond_libtool=true"
--- a/modules/extensions Sun Feb 04 16:28:01 2007 +0000 +++ b/modules/extensions Sun Feb 04 19:09:25 2007 +0000 @@ -6,8 +6,10 @@ Depends-on: +configure.ac-early: +AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + configure.ac: -dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac. Makefile.am: