See automake bug#11302.
On at least OpenSUSE 12.1, "make install" will install libraries in
the '${prefix}/lib64' directory by default. This is due to the
$CONFIG_SITE set by /etc/profile.d/site.sh, which sets a libdir
that ends in '/lib64' rather than '/lib' if it finds that the compiler
is generating 64-bit code. This behaviour was causing some spurious
failures in our testsuite. Fix them.
* t/posixsubst-libraries.sh: Assume the libraries are installed in
'$(libdir)' rather than in '$(prefix)/lib'.
* t/posixsubst-ltlibraries.sh: Likewise.
* t/posixsubst-scripts.sh: Similarly, don't assume that '$(bindir)',
'$(sbindir)' and '$(libexedir)' always defaults to respectively
'$(prefix)/bin', '$(prefix)/sbin' and '$(prefix)/libexec'.
* t/transform3.test: Likewise.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
CLEANFILES = libbar.c # For FreeBSD make.
installcheck-local:
- ls -l $(prefix)/lib
- test -f $(prefix)/lib/libfoo1.a
- test -f $(prefix)/lib/libfoo2.a
- test -f $(prefix)/lib/libbar.a
+ ls -l $(libdir)
+ test -f $(libdir)/libfoo1.a
+ test -f $(libdir)/libfoo2.a
+ test -f $(libdir)/libbar.a
END
echo 'int bar1(void) { return 0; }' > libfoo1.c
CLEANFILES = libbar.c # For FreeBSD make.
installcheck-local:
- ls -l $(prefix)/lib
- test -f $(prefix)/lib/libfoo1.la
- test -f $(prefix)/lib/libfoo2.la
- test -f $(prefix)/lib/libbar.la
+ ls -l $(libdir)
+ test -f $(libdir)/libfoo1.la
+ test -f $(libdir)/libfoo2.la
+ test -f $(libdir)/libbar.la
END
echo 'int bar1(void) { return 0; }' > libfoo1.c
test ! -r $(distdir)/quux.pl
installcheck-local:
- ls -l $(prefix)/libexec $(prefix)/bin $(prefix)/sbin
- test -f $(prefix)/sbin/foo1.sh
- test -x $(prefix)/sbin/foo1.sh
- test -f $(prefix)/sbin/foo2.sh
- test -x $(prefix)/sbin/foo2.sh
- test -f $(prefix)/libexec/bar1
- test -x $(prefix)/libexec/bar1
- test -f $(prefix)/libexec/bar2
- test -x $(prefix)/libexec/bar2
- test -f $(prefix)/bin/quux.pl
- test -x $(prefix)/bin/quux.pl
+ ls -l $(libexecdir) $(bindir) $(sbindir)
+ test -f $(sbindir)/foo1.sh
+ test -x $(sbindir)/foo1.sh
+ test -f $(sbindir)/foo2.sh
+ test -x $(sbindir)/foo2.sh
+ test -f $(libexecdir)/bar1
+ test -x $(libexecdir)/bar1
+ test -f $(libexecdir)/bar2
+ test -x $(libexecdir)/bar2
+ test -f $(bindir)/quux.pl
+ test -x $(bindir)/quux.pl
END
cat > foo1.sh <<'END'
pkgdata_DATA = bar.txt
pkglib_LIBRARIES = libzap.a
pkglibexec_SCRIPTS = mu
+
+test-install: install
+ find $(prefix) ;: For debugging.
+ test -f $(bindir)/gnu-foo
+ test -x $(bindir)/gnu-foo
+ test -f $(datadir)/foo/bar.txt
+ test ! -d $(datadir)/gnu-foo
+ test -f $(libdir)/foo/libzap.a
+ test ! -d $(libdir)/gnu-foo
+ test -f $(libexecdir)/foo/gnu-mu
+ test -x $(libexecdir)/foo/gnu-mu
+ test ! -d $(libexecdir)/gnu-foo
+
+test-installdirs: installdirs
+ find $(prefix) ;: For debugging.
+ test -d $(datadir)/foo
+ test ! -d $(datadir)/gnu-foo
+ test -d $(libdir)/foo
+ test ! -d $(libdir)/gnu-foo
+ test -d $(libexecdir)/foo
+ test ! -d $(libexecdir)/gnu-foo
END
cat > libzap.c <<'END'
./configure --program-prefix=gnu- --prefix "`pwd`/inst"
-$MAKE install
-find inst # For debugging.
-test -f inst/bin/gnu-foo
-test -x inst/bin/gnu-foo
-test -f inst/share/foo/bar.txt
-test ! -d inst/share/gnu-foo
-test -f inst/lib/foo/libzap.a
-test ! -d inst/lib/gnu-foo
-test -f inst/libexec/foo/gnu-mu
-test -x inst/libexec/foo/gnu-mu
-test ! -d inst/libexec/gnu-foo
+$MAKE test-install
$MAKE uninstall
test `find inst -type f -print | wc -l` = 0
# Opportunistically test for installdirs.
rm -rf inst
-$MAKE installdirs
-test -d inst/share/foo
-test ! -d inst/share/gnu-foo
-test -d inst/lib/foo
-test ! -d inst/lib/gnu-foo
-test -d inst/libexec/foo
-test ! -d inst/libexec/gnu-foo
+$MAKE test-installdirs
: