1#! /bin/sh 2# Copyright (C) 2001-2021 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 <https://www.gnu.org/licenses/>. 16 17# Test that installing under $exec_prefix is handled by install-exec. 18# Testing with headers for instance. 19 20. test-init.sh 21 22cat >Makefile.am << 'EOF' 23# User directories. 24inclexecdir = $(exec_prefix)/include 25inclexec_HEADERS = my-config.h 26 27incldatadir = $(prefix)/include 28incldata_HEADERS = my-data.h 29 30## Standard directories: _DATA 31## Commented out are invalid combinations. 32##bin_DATA = data 33##sbin_DATA = data 34##libexec_DATA = data 35data_DATA = data 36sysconf_DATA = data 37localstate_DATA = data 38##lib_DATA = data 39##info_DATA = data 40##man_DATA = data 41##include_DATA = data 42##oldinclude_DATA = data 43pkgdata_DATA = data 44##pkglib_DATA = data 45##pkginclude_DATA = data 46 47## Standard directories: _SCRIPTS 48## Commented out are invalid combinations. 49bin_SCRIPTS = script 50sbin_SCRIPTS = script 51libexec_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 60pkgdata_SCRIPTS = script 61##pkglib_SCRIPTS = script 62##pkginclude_SCRIPTS = script 63EOF 64 65$ACLOCAL 66$AUTOMAKE 67 68# install-SCRIPTS targets. 69sed -n '/^install-data-am/,/^ /p' Makefile.in > produced 70 71cat > expected <<'EOF' 72install-data-am: install-dataDATA install-incldataHEADERS \ 73 install-pkgdataDATA install-pkgdataSCRIPTS 74EOF 75 76diff expected produced 77 78# install-exec targets. 79sed -n '/^install-exec-am/,/^ /p' Makefile.in > produced 80 81cat > expected <<'EOF' 82install-exec-am: install-binSCRIPTS install-inclexecHEADERS \ 83 install-libexecSCRIPTS install-localstateDATA \ 84EOF 85 86diff expected produced 87 88: 89