[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
support for projects without a Makefile.am
From: |
Bruno Haible |
Subject: |
support for projects without a Makefile.am |
Date: |
Sat, 29 Jul 2006 15:16:39 +0200 |
User-agent: |
KMail/1.9.1 |
Hi,
I'm adding support to gnulib-tool for projects which at the top-level
have a Makefile.in but no Makefile.am (such as GNU libiconv).
Bruno
2006-07-29 Bruno Haible <address@hidden>
* gnulib-tool (import, update): If there is no Makefile.am, look at
aclocal.m4, instead of bailing out.
*** gnulib-tool.bak 2006-07-29 00:53:03.000000000 +0200
--- gnulib-tool 2006-07-29 02:59:47.000000000 +0200
***************
*** 1905,1913 ****
fi
fi
- test -f "$destdir"/Makefile.am \
- || func_fatal_error "cannot find $destdir/Makefile.am"
-
# Analyze configure.ac.
guessed_auxdir="."
guessed_libtool=
--- 1968,1973 ----
***************
*** 1942,1971 ****
# To get this list of directories, look at Makefile.am. (Not at
# configure, because it may be omitted from CVS. Also, don't run
# "find $destdir -name gnulib-cache.m4", as it might be too expensive.)
- aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*='
"$destdir"/Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
m4dirs=
m4dirs_count=0
! m4dir_is_next=
! for arg in $aclocal_amflags; do
! if test -n "$m4dir_is_next"; then
! # Ignore absolute directory pathnames, like
/usr/local/share/aclocal.
! case "$arg" in
! /*) ;;
! *)
! if test -f "$destdir/$arg"/gnulib-cache.m4; then
! m4dirs="$m4dirs $arg"
! m4dirs_count=`expr $m4dirs_count + 1`
! fi
! ;;
! esac
! else
! if test "X$arg" = "X-I"; then
! m4dir_is_next=yes
else
! m4dir_is_next=
fi
fi
! done
if test $m4dirs_count = 0; then
# First use of gnulib in a package.
# Any number of additional modules can be given.
--- 2005,2045 ----
# To get this list of directories, look at Makefile.am. (Not at
# configure, because it may be omitted from CVS. Also, don't run
# "find $destdir -name gnulib-cache.m4", as it might be too expensive.)
m4dirs=
m4dirs_count=0
! if test -f "$destdir"/Makefile.am; then
! aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*='
"$destdir"/Makefile.am | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
! m4dir_is_next=
! for arg in $aclocal_amflags; do
! if test -n "$m4dir_is_next"; then
! # Ignore absolute directory pathnames, like
/usr/local/share/aclocal.
! case "$arg" in
! /*) ;;
! *)
! if test -f "$destdir/$arg"/gnulib-cache.m4; then
! m4dirs="$m4dirs $arg"
! m4dirs_count=`expr $m4dirs_count + 1`
! fi
! ;;
! esac
else
! if test "X$arg" = "X-I"; then
! m4dir_is_next=yes
! else
! m4dir_is_next=
! fi
fi
+ done
+ else
+ # No Makefile.am! Oh well. Look at the last generated aclocal.m4.
+ if test -f "$destdir"/aclocal.m4; then
+ sedexpr1='s,^m4_include(\[\(.*\)])$,\1,p'
+ sedexpr2='s,^[^/]*$,.,'
+ sedexpr3='s,/[^/]*$,,'
+ m4dirs=`sed -n -e "$sedexpr1" aclocal.m4 | sed -e "$sedexpr2" -e
"$sedexpr3" | LC_ALL=C sort | LC_ALL=C uniq`
+ m4dirs_count=`echo "$m4dirs" | wc -l`
fi
! fi
if test $m4dirs_count = 0; then
# First use of gnulib in a package.
# Any number of additional modules can be given.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- support for projects without a Makefile.am,
Bruno Haible <=