Merge branch 'minor'
[automake.git] / t / instdat2.sh
blob0240b641204a6aa84fa931b4975bcd18dc2fa1ec
1 #! /bin/sh
2 # Copyright (C) 2001-2017 Free Software Foundation, Inc.
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.
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.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Test that installing under $exec_prefix is handled by install-exec.
18 # Testing with headers for instance.
20 . test-init.sh
22 cat >Makefile.am << 'EOF'
23 # User directories.
24 inclexecdir = $(exec_prefix)/include
25 inclexec_HEADERS = my-config.h
27 incldatadir = $(prefix)/include
28 incldata_HEADERS = my-data.h
30 ## Standard directories: _DATA
31 ## Commented out are invalid combinations.
32 ##bin_DATA = data
33 ##sbin_DATA = data
34 ##libexec_DATA = data
35 data_DATA = data
36 sysconf_DATA = data
37 localstate_DATA = data
38 ##lib_DATA = data
39 ##info_DATA = data
40 ##man_DATA = data
41 ##include_DATA = data
42 ##oldinclude_DATA = data
43 pkgdata_DATA = data
44 ##pkglib_DATA = data
45 ##pkginclude_DATA = data
47 ## Standard directories: _SCRIPTS
48 ## Commented out are invalid combinations.
49 bin_SCRIPTS = script
50 sbin_SCRIPTS = script
51 libexec_SCRIPTS = script
52 ##data_SCRIPTS = script
53 ##sysconf_SCRIPTS = script
54 ##localstate_SCRIPTS = script
55 ##lib_SCRIPTS = script
56 ##info_SCRIPTS = script
57 ##man_SCRIPTS = script
58 ##include_SCRIPTS = script
59 ##oldinclude_SCRIPTS = script
60 pkgdata_SCRIPTS = script
61 ##pkglib_SCRIPTS = script
62 ##pkginclude_SCRIPTS = script
63 EOF
65 $ACLOCAL
66 $AUTOMAKE
68 # install-SCRIPTS targets.
69 sed -n '/^install-data-am/,/^ /p' Makefile.in > produced
71 cat > expected <<'EOF'
72 install-data-am: install-dataDATA install-incldataHEADERS \
73 install-pkgdataDATA install-pkgdataSCRIPTS
74 EOF
76 diff expected produced
78 # install-exec targets.
79 sed -n '/^install-exec-am/,/^ /p' Makefile.in > produced
81 cat > expected <<'EOF'
82 install-exec-am: install-binSCRIPTS install-inclexecHEADERS \
83 install-libexecSCRIPTS install-localstateDATA \
84 EOF
86 diff expected produced