instdir2.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 $(foodir) is the empty string, then nothing should be installed there.
  17. # This test ensures this also if $(foo_PRIMARY) is nonempty, see
  18. # 'instdir.sh'.
  19. . test-init.sh
  20. cat >>configure.ac <<'END'
  21. AC_SUBST([foodir], ['${datadir}'/foo])
  22. AC_OUTPUT
  23. END
  24. mkdir sub
  25. cat >Makefile.am <<'END'
  26. bin_SCRIPTS = s
  27. nobase_bin_SCRIPTS = ns sub/ns
  28. data_DATA = d
  29. nobase_data_DATA = nd sub/nd
  30. include_HEADERS = h
  31. nobase_include_HEADERS = nh sub/nh
  32. foo_DATA = f
  33. nobase_foo_DATA = nf sub/nf
  34. bardir = $(datadir)/bar
  35. bar_DATA = b
  36. nobase_bar_DATA = nb sub/nb
  37. man1_MANS = m1.1
  38. man_MANS = m.2
  39. notrans_man1_MANS = nm1.1
  40. notrans_man_MANS = nm.2
  41. END
  42. : >s
  43. : >ns
  44. : >sub/ns
  45. : >d
  46. : >nd
  47. : >sub/nd
  48. : >h
  49. : >nh
  50. : >sub/nh
  51. : >f
  52. : >nf
  53. : >sub/nf
  54. : >b
  55. : >nb
  56. : >sub/nb
  57. : >m1.1
  58. : >m.2
  59. : >nm1.1
  60. : >nm.2
  61. $ACLOCAL
  62. $AUTOCONF
  63. $AUTOMAKE --add-missing
  64. cwd=$(pwd) || fatal_ "getting current working directory"
  65. instdir=$cwd/inst
  66. destdir=$cwd/dest
  67. mkdir build
  68. cd build
  69. ../configure --prefix="$instdir"
  70. $MAKE
  71. nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
  72. null_install
  73. :