aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-09-13 01:30:02 -0400
committerMike Frysinger <vapier@gentoo.org>2015-09-13 01:30:02 -0400
commit182cde0e780e2b3b0bc7de51f4712c54f47c89ad (patch)
tree42507e8d9f5271c35b1aec17d80a0a42de60865c /autogen.sh
parentgitignore: ignore configure.lineno (diff)
downloadsandbox-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-xautogen.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index 8a53fc8..e583300 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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