diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-09-13 01:30:02 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-09-13 01:30:02 -0400 |
commit | 182cde0e780e2b3b0bc7de51f4712c54f47c89ad (patch) | |
tree | 42507e8d9f5271c35b1aec17d80a0a42de60865c /autogen.sh | |
parent | gitignore: ignore configure.lineno (diff) | |
download | sandbox-182cde0e780e2b3b0bc7de51f4712c54f47c89ad.tar.gz sandbox-182cde0e780e2b3b0bc7de51f4712c54f47c89ad.tar.bz2 sandbox-182cde0e780e2b3b0bc7de51f4712c54f47c89ad.zip |
update autotool files
Fix up the recursive logic with the ax processing so we actually grab all
the ones we need. We probably grab too many, but meh.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -5,7 +5,7 @@ touch ChangeLog # avoid ugly warnings due to mismatch between local libtool and # whatever updated version is on the host -find m4/*.m4 '!' -name 'ax_*.m4' -delete 2>/dev/null || : +rm -f m4/*.m4 # not everyone has sys-devel/autoconf-archive installed has() { [[ " ${*:2} " == *" $1 "* ]] ; } @@ -13,9 +13,9 @@ import_ax() { local macro content m4 lm4s=() content=$(sed -e '/^[[:space:]]*#/d' -e 's:\<dnl\>.*::' "$@") for macro in $(echo "${content}" | grep -o '\<AX[A-Z_]*\>' | sort -u) ; do - if m4=$(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; then + for m4 in $(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; do has ${m4} "${m4s[@]}" || lm4s+=( ${m4} ) - fi + done done if [[ ${#lm4s[@]} -gt 0 ]] ; then cp -v `printf '%s\n' ${lm4s[@]} | sort -u` m4/ @@ -24,8 +24,13 @@ import_ax() { } m4s=() import_ax configure.ac -import_ax m4/ax_*.m4 -import_ax m4/ax_*.m4 +curr=1 +new=0 +while [[ ${curr} -ne ${new} ]] ; do + curr=${#m4s[@]} + import_ax m4/ax_*.m4 + new=${#m4s[@]} +done autoreconf -i -f |