2 # Copyright (C) 2012-2024 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 <https://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.
20 required
='makeinfo tex texi2dvi dvips'
23 cat >> configure.ac
<<'END'
24 AC_SUBST([CC], [whatever])
25 AC_SUBST([JAVAC], [whatever])
30 cat > Makefile.am
<< 'END'
31 AUTOMAKE_OPTIONS
= no-dependencies
33 myexecdir
= $
(prefix
)/myexec
34 javadir
= $
(prefix
)/java
40 for dir
in sbin bin libexec pkglibexec myexec
; do
41 for dst
in '' dist_ nodist_
; do
42 echo "${dst}${dir}_SCRIPTS ="
44 echo "${dir}_PROGRAMS ="
47 for dir
in lib pkglib myexec my
; do
48 echo "${dir}_LIBRARIES ="
49 echo "${dir}_LTLIBRARIES ="
52 for p1
in '' notrans_
; do
53 for p2
in '' dist_ nodist_
; do
54 for s
in '' 1 2 3 4 5 6 7 8 9; do
55 echo "${p1}${p2}man${s}_MANS ="
60 for dst
in '' dist_ nodist_
; do
61 for dir
in dataroot data pkgdata doc lisp my
; do
62 echo "${dst}${dir}_DATA ="
64 for dir
in include pkginclude oldinclude my
; do
65 echo "${dst}${dir}_HEADERS ="
67 for dir
in python my
; do
68 echo "${dst}${dir}_PYTHON ="
70 for dir
in info my
; do
71 echo "${dst}${dir}_TEXINFOS ="
73 for dir
in java my
; do
74 echo "${dst}${dir}_JAVA ="
76 for dir
in lisp my
; do
77 echo "${dst}${dir}_LISP ="
84 sed 's/^/nobase_/' t
>> Makefile.am
87 cat Makefile.am
# For debugging.
90 grep '^oldinclude_HEADERS =' Makefile.am \
91 && grep '^nodist_my_PYTHON =' Makefile.am \
92 && grep '^notrans_dist_man5_MANS =' Makefile.am \
93 || fatal_
"creating Makefile.am"
99 cwd
=$
(pwd) || fatal_
"getting current working directory"
103 run_make
install install-pdf install-ps install-dvi
${1+"$@"}
108 .
/configure
--prefix="$cwd/inst"
110 test ! -e inst ||
{ find inst
; exit 1; }
112 doinst bin_SCRIPTS
=foo.sh
113 test -f inst
/bin
/foo.sh
115 # Explicitly pass prefix to avoid spurious influences from
116 # global config.site scripts.
117 .
/configure
--prefix="/usr/local"
118 test ! -e dest ||
{ find dest
; exit 1; }
120 doinst DESTDIR
="$cwd/dest" bin_SCRIPTS
=foo.sh
121 test -f dest
/usr
/local
/bin
/foo.sh