123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- #!/bin/sh
- . test-init.sh
- plan_ 22
- rm -f configure.ac depcomp
- acoutbs_check ()
- {
- dir=acoutbs$1
- mkdir $dir
- cd $dir
- cat > configure.ac
- touch Makefile.am zot.in
- command_ok_ "aclocal groks '\\' in AC_OUTPUT ($dir)" $ACLOCAL
- command_ok_ "automake groks '\\' in AC_OUTPUT ($dir)" $AUTOMAKE
- command_ok_ "autoconf groks '\\' in AC_OUTPUT ($dir)" $AUTOCONF
- command_ok_ "can ./configure in $dir" ./configure
- command_ok_ "zot created in $dir" test -f zot
- ls -a > lst || bailout_ "cannot get file listing in $dir"
- command_ok_ "'\\' not leaked in filenames in $dir" not grep '\\' lst
- cd ..
- }
- acoutbs_check 1 << 'END'
- AC_INIT([acoutbs1], [1.0])
- AM_INIT_AUTOMAKE
- AC_OUTPUT(Makefile \
- zot)
- END
- acoutbs_check 2 << 'END'
- AC_INIT([acoutbs2], [1.0])
- AM_INIT_AUTOMAKE
- AC_OUTPUT(\
- Makefile \
- zot
- )
- END
- mkdir acoutnoq
- cd acoutnoq
- cat > configure.ac << 'END'
- AC_INIT([acoutnoq], [1.0])
- AM_INIT_AUTOMAKE
- AC_OUTPUT(Makefile, [true])
- END
- : > Makefile.am
- command_ok_ "aclocal and quoted AC_OUTPUT second argument" $ACLOCAL
- command_ok_ "automake and quoted AC_OUTPUT second argument" $AUTOMAKE
- cd ..
- mkdir acoutpt
- cd acoutpt
- cat > configure.ac << 'END'
- AC_INIT([acoutpt], [1.0])
- AM_INIT_AUTOMAKE
- AC_OUTPUT([Makefile], [true])
- END
- : > Makefile.am
- command_ok_ "aclocal and two AC_OUTPUT arguments on same line" $ACLOCAL
- command_ok_ "automake and two AC_OUTPUT arguments on same line" $AUTOMAKE
- cd ..
- mkdir acoutpt2
- cd acoutpt2
- cur=acoutput2
- cat > configure.ac <<END
- AC_INIT([$cur], [1.0])
- AM_INIT_AUTOMAKE
- AC_OUTPUT([subdir/Makefile subdir/foo Makefile foo], [true])
- END
- mkdir subdir
- : > Makefile.am
- : > subdir/Makefile.am
- : > foo.in
- : > subdir/foo.in
- command_ok_ "aclocal and AC_OUTPUT ($cur)" $ACLOCAL
- command_ok_ "automake and AC_OUTPUT ($cur)" $AUTOMAKE
- command_ok_ "foo.in mentioned two times in Makefile.in ($cur)" \
- test $($FGREP -c 'foo.in' Makefile.in) -eq 2
- command_ok_ "'automake -a -f' and AC_OUTPUT ($cur)" \
- $AUTOMAKE --add-missing --force-missing
- cd ..
- mkdir acoutqnl
- cd acoutqnl
- cat > configure.ac << 'END'
- AC_INIT([acoutqnl], [1.0])
- AM_INIT_AUTOMAKE
- AC_OUTPUT([Makefile],
- [echo zardoz has spoken])
- END
- : > Makefile.am
- command_ok_ "aclocal and two AC_OUTPUT arguments on two lines" $ACLOCAL
- command_ok_ "automake and two AC_OUTPUT arguments on two lines" $AUTOMAKE
- cd ..
- exit 0
|