Tom Tromey <[EMAIL PROTECTED]> writes:
> >>>>> "Akim" == Akim Demaille <[EMAIL PROTECTED]> writes:
>
> Akim> . &transform_cond ('BASE' => $strip_subdir,
> Akim> 'EXEC' => $X =~ /exec/)
>
> This is still wrong.
>
> User-defined directory names follow the `exec'-name test.
> autoconf/automake-defined directory names do not.
>
> For instance, `foo_DATA', `data_DATA', and `pkgdata_DATA' must be
> installed by install-data.
I believe the patch is right wrt this, no? There is no `exec'
appearing, hence it works as expected.
> `fooexec_SCRIPTS' and `bin_PROGRAMS' must be installed by install-exec.
> I think the latter case fails the new test.
I think I have this right too, since not all the *.am file depend on
?EXEC?. See SCRIPTS and PROGRAMS below.
~/src/am % grep install-exec *am nostromo Err 1
data.am:?EXEC?.PHONY install-exec-am: install-@DIR@DATA
header.am:?EXEC?.PHONY install-exec-am: install-@DIR@HEADERS
java.am:?EXEC?.PHONY install-exec-am: install-@DIR@JAVA
libs.am:.PHONY install-exec-am: install-@DIR@LIBRARIES
lisp.am:?EXEC?.PHONY install-exec-am: install-@DIR@LISP
ltlib.am:.PHONY install-exec-am: install-@DIR@LTLIBRARIES
progs.am:.PHONY install-exec-am: install-@DIR@PROGRAMS
python.am:.PHONY install-exec-am: install-@DIR@PYTHON
scripts.am:.PHONY install-exec-am: install-@DIR@SCRIPTS
> Akim> I also provide a new test case.
>
> This test is necessary but not sufficient.
> Please add some more cases like those above...
Sorry I'm lost :( Can you help me improve the test?
I'm trying this:
----------
#! /bin/sh
# Test that installing under $exec_prefix is handled by install-exec.
# Testing with headers for instance.
. $srcdir/defs || exit 1
cat >Makefile.am << \EOF
inclexecdir = $(exec_prefix)/include
inclexec_HEADERS = my-config.h
incldatadir = $(prefix)/include
incldata_HEADERS = my-data.h
mybindir = $(bin)/my
mybindir_DATA = data
mysbindir = $(sbin)/my
mysbindir_DATA = data
# Don't write exec in the name to exercise the dependency on libexec
# not on the name of the dir.
mylibexedir = $(libexec)/my
mylibexedir_DATA = data
mysysconfdir = $(sysconf)/my
mysysconfdir_DATA = data
mylocalstatedir = $(localstate)/my
mylocalstatedir_DATA = data
mylibdir = $(lib)/my
mylibdir_DATA = data
mypkglibdir = $(pkglib)/my
mypkglibdir_DATA = data
EOF
set -e
$AUTOMAKE
grep '^install-exec-am: install-inclexecHEADERS$' Makefile.in
grep '^install-data-am: install-incldataHEADERS$' Makefile.in
exit 0
----------
but I get:
=== Running test ./instdata2.test
.am:19: invalid variable `mysysconfdir_DATA'
.am:16: invalid variable `mylibexedir_DATA'
.am:22: invalid variable `mylocalstatedir_DATA'
.am:8: invalid variable `mybindir_DATA'
.am:28: invalid variable `mypkglibdir_DATA'
.am:25: invalid variable `mylibdir_DATA'
.am:11: invalid variable `mysbindir_DATA'
FAIL: instdata2.test