2 # Copyright (C) 2012 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)
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 <http://www.gnu.org/licenses/>.
17 # An empty "foo_PRIMARY" declaration should *not* cause "make install"
18 # to create directory $(foodir). See automake bug#10997 and bug#11030.
24 cat >> configure.ac <<'END'
25 AC_SUBST([CC], [whatever])
26 AC_SUBST([JAVAC], [whatever])
31 cat > Makefile.am << 'END'
32 AUTOMAKE_OPTIONS = no-dependencies
34 myexecdir = $(prefix)/myexec
35 javadir = $(prefix)/java
41 for dir in sbin bin libexec pkglibexec myexec; do
42 for dst in '' dist_ nodist_; do
43 echo "${dst}${dir}_SCRIPTS ="
45 echo "${dir}_PROGRAMS ="
48 for dir in lib pkglib myexec my; do
49 echo "${dir}_LIBRARIES ="
50 echo "${dir}_LTLIBRARIES ="
53 for p1 in '' notrans_; do
54 for p2 in '' dist_ nodist_; do
55 for s in '' 1 2 3 4 5 6 7 8 9; do
56 echo "${p1}${p2}man${s}_MANS ="
61 for dst in '' dist_ nodist_; do
62 for dir in dataroot data pkgdata doc lisp my; do
63 echo "${dst}${dir}_DATA ="
65 for dir in include pkginclude oldinclude my; do
66 echo "${dst}${dir}_HEADERS ="
68 for dir in python my; do
69 echo "${dst}${dir}_PYTHON ="
71 for dir in info my; do
72 echo "${dst}${dir}_TEXINFOS ="
74 for dir in java my; do
75 echo "${dst}${dir}_JAVA ="
77 for dir in lisp my; do
78 echo "${dst}${dir}_LISP ="
85 sed 's/^/nobase_/' t >> Makefile.am
88 cat Makefile.am # For debugging.
91 grep '^oldinclude_HEADERS =' Makefile.am \
92 && grep '^nodist_my_PYTHON =' Makefile.am \
93 && grep '^notrans_dist_man5_MANS =' Makefile.am \
94 || fatal_ "creating Makefile.am"
100 cwd=`pwd` || fatal_ "getting current working directory"
104 $MAKE install install-pdf install-ps install-dvi ${1+"$@"}
109 ./configure --prefix="$cwd/inst"
111 test ! -d inst || { find inst; Exit 1; }
113 doinst bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
114 test -f inst/bin/foo.sh
117 doinst DESTDIR="$cwd/dest"
118 test ! -d dest || { find dest; Exit 1; }
120 doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
121 test -f dest/usr/local/bin/foo.sh