123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- #! /bin/sh
- . test-init.sh
- cat >> configure.ac << 'END'
- AC_CONFIG_MACRO_DIR([defs])
- AM_PROG_LIBTOOL
- AC_OUTPUT
- END
- echo 'm4_include([a.m4])' > acinclude.m4
- echo 'm4_include([b.m4])' > a.m4
- cat >b.m4 <<EOF
- m4_include([c.m4])
- AC_DEFUN([AM_PROG_LIBTOOL],
- [AC_REQUIRE([SOMETHING])dnl
- AC_REQUIRE([SOMETHING_ELSE])dnl
- ])
- AC_DEFUN([SOMETHING])
- EOF
- echo 'm4_include([d.m4])' > c.m4
- echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
- mkdir defs
- echo 'AC_DEFUN([SOMETHING_ELSE])' >defs/e.m4
- echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
- cat >>Makefile.am<<\EOF
- testdist1: distdir
- test -f $(distdir)/acinclude.m4
- test -f $(distdir)/a.m4
- test -f $(distdir)/b.m4
- test -f $(distdir)/c.m4
- test -f $(distdir)/d.m4
- test ! -d $(distdir)/defs
- testdist2: distdir
- test -f $(distdir)/acinclude.m4
- test -f $(distdir)/a.m4
- test -f $(distdir)/b.m4
- test -f $(distdir)/c.m4
- test -f $(distdir)/d.m4
- test ! -f $(distdir)/defs/e.m4
- test -f $(distdir)/defs/f.m4
- EOF
- $ACLOCAL -I defs
- $FGREP acinclude.m4 aclocal.m4
- $FGREP a.m4 aclocal.m4 && exit 1
- $FGREP b.m4 aclocal.m4 && exit 1
- $FGREP c.m4 aclocal.m4 && exit 1
- $FGREP d.m4 aclocal.m4 && exit 1
- $FGREP defs/e.m4 aclocal.m4 && exit 1
- $FGREP defs/f.m4 aclocal.m4 && exit 1
- $AUTOCONF
- $AUTOMAKE
- ./configure
- $MAKE testdist1
- cp aclocal.m4 aclocal.old
- $sleep
- echo 'AC_DEFUN([FOO], [ANOTHER_MACRO])' >> c.m4
- $MAKE
- is_newest aclocal.m4 aclocal.old
- diff aclocal.m4 aclocal.old
- $sleep
- echo FOO >> configure.ac
- $MAKE
- $FGREP defs/f.m4 aclocal.m4
- $MAKE testdist2
- rm -f b.m4
- $ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
- cat stderr >&2
- grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
- :
|