nobase-nodist.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Copyright (C) 2011-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Interaction of 'nobase_' and 'nodist_' prefixes.
  17. . test-init.sh
  18. # Simulate no emacs and no python (it shouldn't be needed in this test).
  19. EMACS="no" PYTHON=":"; export EMCAS PYTHON
  20. cat >> configure.ac << 'END'
  21. AM_PATH_LISPDIR
  22. AM_PATH_PYTHON([], [], [:])
  23. # Simulate no javac (it shouldn't be needed in this test).
  24. AC_SUBST([JAVAC], [false])
  25. AC_OUTPUT
  26. END
  27. cat > Makefile.am << 'END'
  28. nobase_nodist_noinst_PYTHON = baz1.py sub/baz2.py
  29. # Lisp and Java sources are not distributed by default, so try both
  30. # with and without the 'nodist_' prefix, for more coverage.
  31. nobase_noinst_LISP = foo1.el sub/foo2.el
  32. nobase_nodist_noinst_LISP = foo3.el sub/foo4.el
  33. nobase_noinst_JAVA = bar1.java sub/bar2.java
  34. nobase_nodist_noinst_JAVA = bar3.java sub/bar4.java
  35. END
  36. $ACLOCAL
  37. $AUTOCONF
  38. $AUTOMAKE -a
  39. ./configure
  40. $MAKE distdir
  41. ls -l $distdir $distdir/* # For debugging.
  42. test ! -e $distdir/foo1.el
  43. test ! -e $distdir/sub/foo2.el
  44. test ! -e $distdir/foo3.el
  45. test ! -e $distdir/sub/foo4.el
  46. test ! -e $distdir/bar1.java
  47. test ! -e $distdir/sub/bar2.java
  48. test ! -e $distdir/bar3.java
  49. test ! -e $distdir/sub/bar4.java
  50. test ! -e $distdir/baz1.py
  51. test ! -e $distdir/sub/baz2.py
  52. :