tests: cosmetic changes in t/extra-sources.sh
[platform/upstream/automake.git] / t / instdir.sh
1 #! /bin/sh
2 # Copyright (C) 2009-2013 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
17 # If $(foodir) is the empty string, then nothing should be installed there.
18 # This test only ensures this if $(foo_PRIMARY) is also empty, see
19 # 'instdir2.sh' and siblings 'instdir-*.sh' for nonempty contents.
20
21 . test-init.sh
22
23 cat >>configure.ac <<'END'
24 AC_SUBST([foodir], ['${datadir}'/foo])
25 AC_OUTPUT
26 END
27
28 cat >Makefile.am <<'END'
29 bin_SCRIPTS =
30 nobase_bin_SCRIPTS =
31 data_DATA =
32 nobase_data_DATA =
33 include_HEADERS =
34 nobase_include_HEADERS =
35 foo_DATA =
36 nobase_foo_DATA =
37 bardir = $(datadir)/bar
38 bar_DATA =
39 nobase_bar_DATA =
40 man1_MANS =
41 man_MANS =
42 notrans_man1_MANS =
43 notrans_man_MANS =
44 END
45
46 $ACLOCAL
47 $AUTOCONF
48 $AUTOMAKE --add-missing
49
50 cwd=$(pwd) || fatal_ "getting current working directory"
51 instdir=$cwd/inst
52 destdir=$cwd/dest
53 mkdir build
54 cd build
55 ../configure --prefix="$instdir"
56 $MAKE
57
58 nulldirs='bindir= datadir= includedir= foodir= bardir= man1dir= man2dir='
59 null_install
60
61 :