objext-pr10128.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #! /bin/sh
  2. # Copyright (C) 2012-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 for automake bug#10128: $(OBJEXT) redefinition causes
  17. # $(foo_OBJECTS) to be defined as empty.
  18. . test-init.sh
  19. echo AC_OUTPUT >> configure.ac
  20. cat > Makefile.am <<'END'
  21. LINK = echo >$@ Linked $@ from
  22. OBJEXT = fasl
  23. EXEEXT =
  24. noinst_PROGRAMS = foo zardoz
  25. foo_SOURCES = foo.lisp
  26. zardoz_SOURCES = mu1.lisp mu2.lisp
  27. ## Un-commenting this is enough to make the test pass. Weird!
  28. ##.lisp.o:
  29. .lisp.fasl:
  30. touch $@
  31. .PHONY: test
  32. test:
  33. is $(foo_OBJECTS) == foo.fasl
  34. is $(zardoz_OBJECTS) == mu1.fasl mu2.fasl
  35. END
  36. $ACLOCAL
  37. $AUTOMAKE
  38. $AUTOCONF
  39. ./configure
  40. $MAKE test
  41. touch foo.lisp mu1.lisp mu2.lisp
  42. $MAKE all
  43. cat foo
  44. cat zardoz
  45. test "$(cat foo)" = "Linked foo from foo.fasl"
  46. test "$(cat zardoz)" = "Linked zardoz from mu1.fasl mu2.fasl"
  47. :