123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #! /bin/sh
- . test-init.sh
- cat > configure.ac <<END
- AC_INIT([$me], [1.0])
- AM_INIT_AUTOMAKE([foreign -Wall -Werror])
- AC_CONFIG_FILES([Makefile sub/Makefile])
- AC_SUBST([MAGIC], [magic])
- AC_OUTPUT
- END
- echo SUBDIRS = sub > Makefile.am
- mkdir sub
- : > sub/Makefile.am
- ocwd=$(pwd) || fatal_ "cannot get current working directory"
- mkdir bin
- cat > bin/automake <<END
- #!/bin/sh
- set -e
- PATH='$PATH'; export PATH
- sentinel='$ocwd/automake-has-run'
- if test -f "\$sentinel"; then
- echo "Automake has been run more than one time" >&2
- exit 1
- else
- echo automake has run > "\$sentinel"
- fi
- $sleep; $sleep;
- exec $AUTOMAKE \${1+"\$@"}
- END
- chmod a+x bin/automake
- cat > bin/aclocal <<END
- #!/bin/sh
- set -e
- PATH='$PATH'; export PATH
- sentinel='$ocwd/aclocal-has-run'
- if test -f "\$sentinel"; then
- echo "Aclocal has been run more than one time" >&2
- exit 1
- else
- echo aclocal has run > "\$sentinel"
- fi
- $sleep; $sleep;
- exec $ACLOCAL \${1+"\$@"}
- END
- chmod a+x bin/aclocal
- cp bin/automake bin/automake-$APIVERSION
- cp bin/aclocal bin/aclocal-$APIVERSION
- PATH=$ocwd/bin$PATH_SEPARATOR$PATH; export PATH
- AUTOMAKE=automake ACLOCAL=aclocal; export AUTOMAKE ACLOCAL
- $ACLOCAL
- $AUTOMAKE
- $AUTOCONF
- test -f automake-has-run
- test -f aclocal-has-run
- rm -f automake-has-run aclocal-has-run
- ./configure
- run_make ACLOCAL=false AUTOMAKE=false AUTOCONF=false
- $sleep
- sed "s|magic|magic2|" configure.ac > t
- mv -f t configure.ac
- cd sub
- run_make Makefile AUTOMAKE="$AUTOMAKE" ACLOCAL="$ACLOCAL"
- cd ..
- ls -l . sub
- grep -i magic configure Makefile.in Makefile sub/Makefile.in sub/Makefile
- $FGREP magic2 configure
- $FGREP magic2 Makefile
- $FGREP magic2 sub/Makefile
- :
|