2
0

instdir-prog.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 $(bindir), $(libdir) or $(pyexecdir) is the empty string, then
  17. # nothing should be installed there.
  18. # This test exercises the prog and libs code paths.
  19. required=cc
  20. . test-init.sh
  21. cat >>configure.ac <<'END'
  22. AC_PROG_CC
  23. AM_PROG_AR
  24. AC_PROG_RANLIB
  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_LIBRARIES = libfoo.a
  34. nobase_lib_LIBRARIES = libnfoo.a sub/libnfoo.a
  35. pyexec_PROGRAMS = py
  36. nobase_pyexec_PROGRAMS = npy sub/npy
  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 py.c
  47. cp p.c npy.c
  48. cp p.c sub/npy.c
  49. $ACLOCAL
  50. $AUTOCONF
  51. $AUTOMAKE --add-missing
  52. cwd=$(pwd) || fatal_ "getting current working directory"
  53. instdir=$cwd/inst
  54. destdir=$cwd/dest
  55. mkdir build
  56. cd build
  57. ../configure --prefix="$instdir" PYTHON="echo" \
  58. am_cv_python_pythondir="$instdir/python" \
  59. am_cv_python_pyexecdir="$instdir/pyexec"
  60. nulldirs='bindir= libdir= pyexecdir='
  61. null_install
  62. :