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.
22 cat >> configure.ac <<'END'
23 AC_SUBST([CC], [whatever])
24 AC_SUBST([JAVAC], [whatever])
29 cat > Makefile.am << 'END'
30 AUTOMAKE_OPTIONS = no-dependencies
32 myexecdir = $(prefix)/myexec
33 javadir = $(prefix)/java
39 for dir in sbin bin libexec pkglibexec myexec; do
40 for dst in '' dist_ nodist_; do
41 echo "${dst}${dir}_SCRIPTS ="
43 echo "${dir}_PROGRAMS ="
46 for dir in lib pkglib myexec my; do
47 echo "${dir}_LIBRARIES ="
48 echo "${dir}_LTLIBRARIES ="
51 for p1 in '' notrans_; do
52 for p2 in '' dist_ nodist_; do
53 for s in '' 1 2 3 4 5 6 7 8 9; do
54 echo "${p1}${p2}man${s}_MANS ="
59 for dst in '' dist_ nodist_; do
60 for dir in dataroot data pkgdata doc lisp my; do
61 echo "${dst}${dir}_DATA ="
63 for dir in include pkginclude oldinclude my; do
64 echo "${dst}${dir}_HEADERS ="
66 for dir in python my; do
67 echo "${dst}${dir}_PYTHON ="
69 for dir in info my; do
70 echo "${dst}${dir}_TEXINFOS ="
72 for dir in java my; do
73 echo "${dst}${dir}_JAVA ="
75 for dir in lisp my; do
76 echo "${dst}${dir}_LISP ="
83 sed 's/^/nobase_/' t >> Makefile.am
86 cat Makefile.am # For debugging.
89 grep '^oldinclude_HEADERS =' Makefile.am \
90 && grep '^nodist_my_PYTHON =' Makefile.am \
91 && grep '^notrans_dist_man5_MANS =' Makefile.am \
92 || fatal_ "creating Makefile.am"
98 cwd=`pwd` || fatal_ "getting current working directory"
102 $MAKE install install-pdf install-ps install-dvi ${1+"$@"}
107 ./configure --prefix="$cwd/inst"
109 test ! -d inst || { find inst; Exit 1; }
111 doinst bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
112 test -f inst/bin/foo.sh
115 doinst DESTDIR="$cwd/dest"
116 test ! -d dest || { find dest; Exit 1; }
118 doinst DESTDIR="$cwd/dest" bin_SCRIPTS=foo.sh AM_MAKEFLAGS='bin_SCRIPTS=foo.sh'
119 test -f dest/usr/local/bin/foo.sh