noinstdir.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #! /bin/sh
  2. # Copyright (C) 2001-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. # Test to make sure that noinst_* and check_* are not installed.
  17. # From Pavel Roskin.
  18. required=cc
  19. . test-init.sh
  20. cat > Makefile.am << 'END'
  21. noinst_SCRIPTS = foo.sh
  22. noinst_DATA = foo.xpm
  23. noinst_LIBRARIES = libfoo.a
  24. noinst_PROGRAMS = foo
  25. noinst_HEADERS = foo.h
  26. check_SCRIPTS = bar.sh
  27. check_DATA = bar.xpm
  28. check_LIBRARIES = libbar.a
  29. check_PROGRAMS = bar
  30. check_HEADERS = bar.h
  31. END
  32. cat >> configure.ac << 'END'
  33. AC_PROG_CC
  34. AM_PROG_AR
  35. AC_PROG_RANLIB
  36. AC_OUTPUT
  37. END
  38. : > ar-lib
  39. $ACLOCAL
  40. $AUTOMAKE
  41. $EGREP '(noinst|check)dir' Makefile.in && exit 1
  42. $AUTOCONF
  43. ./configure --prefix="$(pwd)/inst"
  44. echo 'int main (void) { return 0; }' > foo.c
  45. echo 'int main (void) { return 0; }' > bar.c
  46. echo 'int foo (void) { return 0; }' > libfoo.c
  47. echo 'int bar (void) { return 0; }' > libbar.c
  48. : > foo.sh
  49. : > foo.xpm
  50. : > foo.h
  51. : > bar.sh
  52. : > bar.xpm
  53. : > bar.h
  54. $MAKE
  55. $MAKE install
  56. test ! -e inst
  57. :