direct suffix rules.
* tests/suffix12.test: New test.
* tests/Makefile.am (TESTS): Add it.
Report from John Ratliff.
+2006-04-09 Stepan Kasal <kasal@ucw.cz>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * automake.in (handle_single_transform): Preserve directories in
+ direct suffix rules.
+ * tests/suffix12.test: New test.
+ * tests/Makefile.am (TESTS): Add it.
+ Report from John Ratliff.
+
2006-03-25 Mike Frysinger <vapier@gentoo.org> (tiny change)
Alexandre Duret-Lutz <adl@gnu.org>
Johan Danielsson joda@pdc.kth.se
Johannes Nicolai johannes.nicolai@student.hpi.uni-potsdam.de
John Pierce hawkfan@pyrotechnics.com
+John Ratliff autoconf@technoplaza.net
John W. Coomes jcoomes@eng.Sun.COM
Josh MacDonald jmacd@cs.berkeley.edu
Joshua Cowan jcowan@jcowan.reslife.okstate.edu
# This is probably the result of a direct suffix rule.
# In this case we just accept the rewrite.
$object = "$base$extension";
+ $object = "$directory/$object" if $directory ne '';
$linker = '';
}
else
# For Java, the way we're handling it right now, a
# `..' component doesn't make sense.
- if ($lang->name eq 'java' && $object =~ /(\/|^)\.\.\//)
+ if ($lang && $lang->name eq 'java' && $object =~ /(\/|^)\.\.\//)
{
err_am "`$full' should not contain a `..' component";
}
suffix9.test \
suffix10.test \
suffix11.test \
+suffix12.test \
symlink.test \
symlink2.test \
symlink3.test \
substtarg.test suffix.test suffix2.test suffix3.test \
suffix4.test suffix5.test suffix6.test suffix7.test \
suffix8.test suffix9.test suffix10.test suffix11.test \
- symlink.test symlink2.test symlink3.test syntax.test tags.test \
- tagsub.test tar.test tar2.test tar3.test target-cflags.test \
- targetclash.test txinfo.test txinfo2.test txinfo3.test \
- txinfo4.test txinfo5.test txinfo6.test txinfo7.test \
- txinfo8.test txinfo9.test txinfo10.test txinfo13.test \
- txinfo16.test txinfo17.test txinfo18.test txinfo19.test \
- txinfo20.test txinfo21.test txinfo22.test txinfo23.test \
- txinfo24.test txinfo25.test txinfo26.test txinfo27.test \
- txinfo28.test txinfo29.test txinfo30.test transform.test \
- unused.test vars.test vars3.test vartar.test version.test \
- version2.test version3.test version4.test version6.test \
- version7.test version8.test vpath.test vtexi.test vtexi2.test \
- warnopts.test werror.test werror2.test whoami.test \
- xsource.test yacc.test yacc2.test yacc3.test yacc4.test \
- yacc5.test yacc6.test yacc7.test yacc8.test yaccpp.test \
- yaccvpath.test
+ suffix12.test symlink.test symlink2.test symlink3.test \
+ syntax.test tags.test tagsub.test tar.test tar2.test tar3.test \
+ target-cflags.test targetclash.test txinfo.test txinfo2.test \
+ txinfo3.test txinfo4.test txinfo5.test txinfo6.test \
+ txinfo7.test txinfo8.test txinfo9.test txinfo10.test \
+ txinfo13.test txinfo16.test txinfo17.test txinfo18.test \
+ txinfo19.test txinfo20.test txinfo21.test txinfo22.test \
+ txinfo23.test txinfo24.test txinfo25.test txinfo26.test \
+ txinfo27.test txinfo28.test txinfo29.test txinfo30.test \
+ transform.test unused.test vars.test vars3.test vartar.test \
+ version.test version2.test version3.test version4.test \
+ version6.test version7.test version8.test vpath.test \
+ vtexi.test vtexi2.test warnopts.test werror.test werror2.test \
+ whoami.test xsource.test yacc.test yacc2.test yacc3.test \
+ yacc4.test yacc5.test yacc6.test yacc7.test yacc8.test \
+ yaccpp.test yaccvpath.test
subdir = tests
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2002, 2003, 2006 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., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Tests that Automake understands suffix rules with subdir objects.
+# Reported by John Ratliff.
+
+. ./defs || exit 1
+
+set -e
+
+cat >>configure.in <<EOF
+AC_PROG_CC
+AC_OUTPUT
+EOF
+
+cat >Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+SUFFIXES = .baz .o
+# we fake here:
+.baz.o:
+ cp $< $@
+
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c sub/bar.baz
+print:
+ @echo BEGIN: $(foo_OBJECTS) :END
+END
+
+mkdir sub
+: > sub/bar.baz
+: > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+env OBJEXT=OBJ $MAKE -e print >stdout
+cat stdout
+grep 'BEGIN: foo.OBJ sub/bar.OBJ :END' stdout