123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #! /bin/sh
- . test-init.sh
- cat >> configure.ac << 'END'
- AC_CONFIG_FILES([sub1/Makefile sub2/Makefile sub1/subsub/Makefile])
- AM_CONDITIONAL([COND], [false])
- AC_SUBST([extra_subdirs], [''])
- AC_OUTPUT
- END
- mkdir sub1 sub2 sub1/subsub
- cat > Makefile.am << 'END'
- SUBDIRS = sub1
- if COND
- SUBDIRS += sub2
- endif
- END
- cat > sub1/Makefile.am << 'END'
- all-local:
- : > run
- CLEANFILES = run
- SUBDIRS = @extra_subdirs@
- DIST_SUBDIRS = subsub
- END
- cat > sub2/Makefile.am << 'END'
- all-local:
- @echo "Should not run in `pwd`!"
- exit 1
- DISTCLEANFILES = oops
- END
- cp sub2/Makefile.am sub1/subsub/Makefile.am
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE -c --add-missing
- ./configure
- test -f sub1/Makefile
- test -f sub2/Makefile
- test -f sub1/subsub/Makefile
- $MAKE
- test -f sub1/run
- touch sub2/oops sub1/subsub/oops
- $MAKE distclean
- test ! -e sub1/run
- test ! -e sub2/oops
- test ! -e sub1/subsub/oops
- test ! -e sub1/Makefile
- test ! -e sub2/Makefile
- test ! -e sub1/subsub/Makefile
- mkdir build
- cd build
- ../configure
- $MAKE
- test -f sub1/Makefile
- test -f sub2/Makefile
- test -f sub1/subsub/Makefile
- test -f sub1/run
- touch sub2/oops sub1/subsub/oops
- $MAKE maintainer-clean
- test ! -e sub1/run
- test ! -e sub2/oops
- test ! -e sub1/subsub/oops
- test ! -e sub1/Makefile
- test ! -e sub2/Makefile
- test ! -e sub1/subsub/Makefile
- cd ..
- ./configure
- $MAKE distclean
- :
|