suffix5.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 Automake include libtool objects resulting
  17. # from user-defined implicit rules.
  18. # Based on a report from Arkadiusz Miskiewicz <misiek@pld.ORG.PL>.
  19. required='cc libtool'
  20. . test-init.sh
  21. cat >> configure.ac << 'END'
  22. AC_SUBST([LINK], [:])
  23. AM_PROG_AR
  24. AC_PROG_LIBTOOL
  25. AC_OUTPUT
  26. END
  27. cat > Makefile.am << 'END'
  28. .k.lo:
  29. ## Account for VPATH issues on weaker make implementations.
  30. (echo $< && cat `test -f '$<' || echo $(srcdir)/`$<) > $@
  31. noinst_LTLIBRARIES = libfoo.la
  32. libfoo_la_SOURCES = foo.k
  33. .PHONY: test
  34. test: all
  35. grep '^=GREP=ME=$$' foo.lo
  36. ## Weaker regex to account for VPATH issues.
  37. grep 'foo\.k$$' foo.lo
  38. check-local: test
  39. END
  40. : > ltmain.sh
  41. for auxscript in ar-lib config.guess config.sub; do
  42. cp "$am_scriptdir/$auxscript" . \
  43. || fatal_ "fetching auxiliary script '$auxscript'"
  44. done
  45. $ACLOCAL
  46. $AUTOMAKE
  47. grep '_OBJECTS.*foo\.lo' Makefile.in
  48. $AUTOCONF
  49. ./configure
  50. echo '=GREP=ME=' > foo.k
  51. $MAKE test
  52. $MAKE distcheck
  53. :