2
0

instdir-ltlib.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #! /bin/sh
  2. # Copyright (C) 2009-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. # If $(libdir) or $(pyexecdir) is the empty string, then nothing should
  17. # be installed there.
  18. # This test exercises the libtool code paths.
  19. required='cc libtoolize'
  20. . test-init.sh
  21. cat >>configure.ac <<'END'
  22. AC_PROG_CC
  23. AM_PROG_AR
  24. AC_PROG_LIBTOOL
  25. AM_PATH_PYTHON
  26. AC_OUTPUT
  27. END
  28. mkdir sub
  29. cat >Makefile.am <<'END'
  30. AUTOMAKE_OPTIONS = subdir-objects
  31. bin_PROGRAMS = p
  32. nobase_bin_PROGRAMS = np sub/np
  33. lib_LTIBRARIES = libfoo.la
  34. nobase_lib_LTLIBRARIES = libnfoo.la sub/libnfoo.la
  35. pyexec_LTIBRARIES = libpy.la
  36. nobase_pyexec_LTLIBRARIES = libnpy.la sub/libnpy.la
  37. END
  38. cat >p.c <<'END'
  39. int main () { return 0; }
  40. END
  41. cp p.c np.c
  42. cp p.c sub/np.c
  43. cp p.c libfoo.c
  44. cp p.c libnfoo.c
  45. cp p.c sub/libnfoo.c
  46. cp p.c libpy.c
  47. cp p.c libnpy.c
  48. cp p.c sub/libnpy.c
  49. libtoolize
  50. $ACLOCAL
  51. $AUTOCONF
  52. $AUTOMAKE --add-missing
  53. cwd=$(pwd) || fatal_ "getting current working directory"
  54. instdir=$cwd/inst
  55. destdir=$cwd/dest
  56. mkdir build
  57. cd build
  58. ../configure --prefix="$instdir" PYTHON="echo" \
  59. am_cv_python_pythondir="$instdir/python" \
  60. am_cv_python_pyexecdir="$instdir/pyexec"
  61. nulldirs='bindir= libdir= pyexecdir='
  62. null_install
  63. :