diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2003-11-30 13:35:29 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2003-11-30 13:35:29 +0000 |
commit | eeb898225e9bcb9f4d5c40b85813d239d9a93c04 (patch) | |
tree | fb22d0db1d5d66fb665fc0cb8a6efa7928c34e22 /tests/ltlibsrc.test | |
parent | 0a1c8dcb1b48fbed5497392df29c2593c141e394 (diff) | |
download | automake-eeb898225e9bcb9f4d5c40b85813d239d9a93c04.tar.gz |
* automake.in (&handle_source_transform): Calculate a default file
for use in the absence of an appropriate _SOURCES declaration by
first stripping any suffix from the unxformed target name, and
appending `.c'.
* doc/automake.texi (Program Sources, Libtool Modules): Document this.
* tests/ltlibsrc.test: New file.
* tests/Makefile.am (TESTS): Add ltlibsrc.test.
Diffstat (limited to 'tests/ltlibsrc.test')
-rwxr-xr-x | tests/ltlibsrc.test | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/ltlibsrc.test b/tests/ltlibsrc.test new file mode 100755 index 000000000..fac0636ce --- /dev/null +++ b/tests/ltlibsrc.test @@ -0,0 +1,59 @@ +#! /bin/sh +# Copyright (C) 2003 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Test to make sure a sensible default source for libraries is used. + +required='libtool gcc' +. ./defs || exit 1 + +cat > configure.in << 'END' +AC_INIT([foo], [0.1]) +AC_CONFIG_SRCDIR([foo.c]) +AM_INIT_AUTOMAKE +AC_PROG_CC +AC_PROG_LIBTOOL +AC_CONFIG_FILES(Makefile) +AC_OUTPUT +END + +cat > Makefile.am << 'END' +pkglib_LTLIBRARIES = foo.la +foo_la_LDFLAGS = -module +END + +cat > foo.c << 'END' +int foo (void) { return 0; } +END + +libtoolize +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +mkdir sub +cd sub + +../configure +$MAKE || exit 1 + +test -f foo.la || exit 1 +: + +exit 0 |