libobj10.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #! /bin/sh
  2. # Copyright (C) 1999-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. # Do not complain about the nonexistence of a source for LIBOBJS if
  17. # it's in BUILT_SOURCES. Reported by Erez Zadok.
  18. required=cc
  19. . test-init.sh
  20. cat >> configure.ac << 'END'
  21. AC_PROG_CC
  22. AM_PROG_AR
  23. AC_PROG_RANLIB
  24. AC_LIBOBJ([foo])
  25. AC_OUTPUT
  26. END
  27. cat > Makefile.am << 'END'
  28. noinst_LIBRARIES = libfoo.a
  29. libfoo_a_SOURCES =
  30. libfoo_a_LIBADD = $(LIBOBJS)
  31. BUILT_SOURCES = foo.c
  32. CLEANFILES = foo.c
  33. foo.c:
  34. echo 'extern int dummy;' > $@
  35. .PHONY: debugging
  36. debugging:
  37. $(AR) t libfoo.a
  38. END
  39. cp "$am_scriptdir/ar-lib" . || fatal_ "fetching auxiliary script 'ar-lib'"
  40. $ACLOCAL
  41. $AUTOCONF
  42. $AUTOMAKE
  43. ./configure
  44. $MAKE
  45. $MAKE debugging
  46. $MAKE distcheck
  47. :