+2002-03-05 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ Fix for PR automake/300:
+ * tests/pr300-lib.test, tests/pr300-ltlib.test,
+ tests/pr300-prog.test: New files.
+ * tests/Makefile.am (TESTS): Add them.
+ * automake.in (handle_ltlibraries): Strip nobase_ prefix to
+ compute the directory.
+ * lib/am/header-vars.am (install_sh_PROGRAM): New variable.
+ * lib/am/libs.am (%DIR%LIBRARIES_INSTALL): New variable.
+ (install-%DIR%LIBRARIES): Use it. Honor nobase_.
+ (uninstall-%DIR%LIBRARIES): Honor nobase_.
+ * lib/am/ltlibs.am (%DIR%LTLIBRARIES_INSTALL): New variable.
+ (install-%DIR%LTLIBRARIES): Use it. Honor nobase_.
+ (uninstall-%DIR%LTLIBRARIES): Honor nobase_.
+ * lib/am/progs.am (%DIR%PROGRAMS_INSTALL): New variable.
+ (install-%DIR%PROGRAMS): Use it. Honor nobase_.
+ (uninstall-%DIR%PROGRAMS): Honor nobase_.
+ See also the fix for nobase.test on 2001-11-09.
+
2002-03-05 Tom Tromey <tromey@redhat.com>
* lib/config.sub, lib/config.guess, lib/texinfo.tex: Updated.
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
}
# Get the installation directory of each library.
+ (my $dir = $key) =~ s/^nobase_//;
for (variable_value_as_list_recursive ($key . '_LTLIBRARIES', 'all'))
{
if ($instdirs{$_})
}
else
{
- $instdirs{$_} = $key;
+ $instdirs{$_} = $dir;
}
}
}
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.52i for GNU Automake 1.5e.
+# Generated by GNU Autoconf 2.52j for GNU Automake 1.5e.
#
# Report bugs to <bug-automake@gnu.org>.
#
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
+# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
-# FIXME: should be removed in autoconf 3.0.
+# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
if $ac_init_version; then
cat <<\_ACEOF
GNU Automake configure 1.5e
-generated by GNU Autoconf 2.52i
+generated by GNU Autoconf 2.52j
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Automake $as_me 1.5e, which was
-generated by GNU Autoconf 2.52i. Invocation command line was
+generated by GNU Autoconf 2.52j. Invocation command line was
$ $0 $@
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD compatible install" >&5
-echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
cat >&5 <<_CSEOF
This file was extended by GNU Automake $as_me 1.5e, which was
-generated by GNU Autoconf 2.52i. Invocation command line was
+generated by GNU Autoconf 2.52j. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
GNU Automake config.status 1.5e
-configured by $0, generated by GNU Autoconf 2.52i,
+configured by $0, generated by GNU Autoconf 2.52j,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
if %?INSTALL%
_am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?BASE?%DIR%LIBRARIES_INSTALL = $(INSTALL_DATA)
+?!BASE?%DIR%LIBRARIES_INSTALL = $(install_sh_DATA)
?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
## a syntax error in sh.
@list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(%NDIR%dir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(%NDIR%dir)/$$p; \
+## Compute basename of source file. Unless this is a nobase_ target, we
+## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
+## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
+?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE? f="$$p"; \
+ echo " $(%DIR%LIBRARIES_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+ $(%DIR%LIBRARIES_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
else :; fi; \
done
## We do two loops here so that $(POST_INSTALL) can be empty. If we
@$(POST_INSTALL)
@list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
+?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
## Must ranlib after installing because mod time changes.
echo " $(RANLIB) $(DESTDIR)$(%NDIR%dir)/$$p"; \
$(RANLIB) $(DESTDIR)$(%NDIR%dir)/$$p; \
uninstall-%DIR%LIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
+?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$p"; \
rm -f $(DESTDIR)$(%NDIR%dir)/$$p; \
done
if %?INSTALL%
_am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?BASE?%DIR%LTLIBRARIES_INSTALL = $(INSTALL)
+?!BASE?%DIR%LTLIBRARIES_INSTALL = $(install_sh) -c
?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
## a syntax error in sh.
@list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
+## Compute basename of source file. Unless this is a nobase_ target, we
+## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
+## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
+?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
+?!BASE? f="$$p"; \
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
## Use INSTALL and not INSTALL_DATA because libtool knows the right
## permissions to use.
-?LIBTOOL? echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$p"; \
-?LIBTOOL? $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$p; \
-?!LIBTOOL? echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$p"; \
-?!LIBTOOL? $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$p; \
+?LIBTOOL? echo " $(LIBTOOL) --mode=install $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?LIBTOOL? $(LIBTOOL) --mode=install $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?!LIBTOOL? echo " $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?!LIBTOOL? $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
else :; fi; \
done
endif %?INSTALL%
uninstall-%DIR%LTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
+?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
?LIBTOOL? echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(%NDIR%dir)/$$p"; \
?LIBTOOL? $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(%NDIR%dir)/$$p; \
?!LIBTOOL? echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$p"; \
if %?INSTALL%
_am_installdirs += $(DESTDIR)$(%NDIR%dir)
+?BASE?%DIR%PROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+?!BASE?%DIR%PROGRAMS_INSTALL = $(install_sh_PROGRAM)
?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
if test -f $$p \
?LIBTOOL? || test -f $$p1 \
; then \
+## Compute basename of source file. Unless this is a nobase_ target, we
+## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
+## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
+?BASE? p1=`echo "$$p1" | sed -e 's,^.*/,,'`; \
+ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
## Note that we explicitly set the libtool mode. This avoids any
## lossage if the install program doesn't have a name that libtool
## expects.
- f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
-?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
-?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
-?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
-?!LIBTOOL? $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
+?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
+?!LIBTOOL? $(INSTALL_PROGRAM_ENV) $(%DIR%PROGRAMS_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
else :; fi; \
done
endif %?INSTALL%
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+?BASE? f=`echo "$$f" | sed -e 's,^.*/,,'`; \
echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
done
pr279.test \
pr279-2.test \
pr287.test \
+pr300-lib.test \
+pr300-ltlib.test \
+pr300-prog.test \
prefix.test \
primary.test \
primary2.test \
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@
pr279.test \
pr279-2.test \
pr287.test \
+pr300-lib.test \
+pr300-ltlib.test \
+pr300-prog.test \
prefix.test \
primary.test \
primary2.test \
--- /dev/null
+#! /bin/sh
+
+# Make sure that installing subdirectory libraries works.
+# PR/300
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_RANLIB
+AC_PROG_CC
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = subdir/liba.a
+subdir_liba_a_SOURCES = a.c
+
+nobase_lib_LIBRARIES = subdir/libb.a
+subdir_libb_a_SOURCES = a.c
+END
+
+cat > a.c << 'END'
+int i = 3;
+END
+
+## A rule in the Makefile should create subdir
+# mkdir subdir
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+./configure --prefix `pwd`/inst
+$MAKE
+
+test -f subdir/liba.a
+test -f subdir/libb.a
+
+$MAKE install
+
+test -f inst/lib/liba.a
+test -f inst/lib/subdir/libb.a
+
+$MAKE uninstall
+
+test -f inst/lib/liba.a && exit 1
+test -f inst/lib/subdir/libb.a && exit 1
+
+$MAKE install-strip
+
+test -f inst/lib/liba.a
+test -f inst/lib/subdir/libb.a
--- /dev/null
+#! /bin/sh
+
+# Make sure that installing subdirectory libtool libraries works.
+# PR/300
+
+required=libtoolize
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+lib_LTLIBRARIES = subdir/liba.la
+subdir_liba_la_SOURCES = a.c
+
+nobase_lib_LTLIBRARIES = subdir/libb.la
+subdir_libb_la_SOURCES = a.c
+END
+
+cat > a.c << 'END'
+int i = 3;
+END
+
+## A rule in the Makefile should create subdir
+# mkdir subdir
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+./configure --prefix `pwd`/inst
+$MAKE
+
+test -f subdir/liba.la
+test -f subdir/libb.la
+
+$MAKE install
+
+test -f inst/lib/liba.la
+test -f inst/lib/subdir/libb.la
+
+$MAKE uninstall
+
+test -f inst/lib/liba.la && exit 1
+test -f inst/lib/subdir/libb.la && exit 1
+
+$MAKE install-strip
+
+test -f inst/lib/liba.la
+test -f inst/lib/subdir/libb.la
--- /dev/null
+#! /bin/sh
+
+# Make sure that installing subdirectory programs works.
+# PR/300
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = subdir/wish
+subdir_wish_SOURCES = a.c
+
+nobase_bin_PROGRAMS = subdir/want
+subdir_want_SOURCES = a.c
+END
+
+cat > a.c << 'END'
+#include <stdio.h>
+int main ()
+{
+ printf ("hi liver!\n");
+ return 0;
+}
+END
+
+## A rule in the Makefile should create subdir
+# mkdir subdir
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --copy --add-missing
+./configure --prefix `pwd`/inst
+$MAKE
+
+test -f subdir/wish
+test -f subdir/want
+
+$MAKE install
+
+test -f inst/bin/wish
+test -f inst/bin/subdir/want
+
+$MAKE uninstall
+
+test -f inst/bin/wish && exit 1
+test -f inst/bin/subdir/want && exit 1
+
+$MAKE install-strip
+
+test -f inst/bin/wish
+test -f inst/bin/subdir/want