2011-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Create subdirs for generated sources even when not dep tracking.
+ * automake.in (handle_single_transform): If $object is derived
+ and lands in subdir, be sure to output a dirstamp dependency.
+ * tests/yacc5.test: Avoid falsely matching the dirstamp
+ dependency when grepping for a rule.
+ * tests/lex-subobj-nodep.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+ * THANKS: Update.
+ Report by Ignacy Gawedzki.
+
Fix locale issue in check-exported-srcdir.test.
* tests/check-exported-srcdir.test: Reformulate glob to not fail
in a locale that ignores or interleaves character case.
He Li tippa000@yahoo.com
Henrik Frystyk Nielsen frystyk@w3.org
Ian Lance Taylor ian@cygnus.com
+Ignacy Gawedzki i@lri.fr
Илья Н. Голубев gin@mo.msk.ru
Imacat imacat@mail.imacat.idv.tw
Inoue inoue@ainet.or.jp
# derived from is not.
&push_dist_common ($object)
unless ($topparent =~ /^(?:nobase_)?nodist_/);
+
+ # If resulting derived source is in a subdir, we need to make
+ # sure the subdir exists at build time.
+ if ($object =~ /\//)
+ {
+ my $dirstamp = require_build_directory_maybe ($object);
+ depend ($object, $dirstamp)
+ if ($dirstamp);
+ }
next;
}
lex3.test \
lex4.test \
lex5.test \
+lex-subobj-nodep.test \
lflags.test \
lflags2.test \
libexec.test \
lex3.test \
lex4.test \
lex5.test \
+lex-subobj-nodep.test \
lflags.test \
lflags2.test \
libexec.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program 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.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure subdirs for subdir scanners are generated when subdir-objects
+# are used, even when dependency tracking is disabled.
+
+required=flex
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_OUTPUT
+END
+
+cat >Makefile.am <<\END
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p1 p2
+p1_SOURCES = sub1/s1.l
+p2_SOURCES = sub2/s2.l
+p2_CPPFLAGS = -DWHATEVER
+END
+
+mkdir sub1 sub2
+
+cat >sub1/s1.l <<\END
+%%
+"END" return EOF;
+.
+%%
+int main (void)
+{
+ while (yylex () != EOF)
+ ;
+ return 0;
+}
+
+int yywrap(void)
+{
+ return 0;
+}
+END
+
+cp sub1/s1.l sub2/s2.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+mkdir build
+cd build
+../configure --disable-dependency-tracking
+$MAKE sub1/s1.c
+$MAKE sub2/s2.c
+rm -rf sub1 sub2
+$MAKE
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$ACLOCAL
$AUTOMAKE -a
-grep '^maude\.c:' Makefile.in
+grep '^maude\.c:.*maude\.y' Makefile.in
## Try again with subdir-objects.
$ACLOCAL
$AUTOMAKE -a
-# No rule needed, the default .y.c: inference rule is enough.
-grep '^sub/maude\.c:' Makefile.in && Exit 1
+# No rule needed, the default .y.c: inference rule is enough
+# (but there may be an additional dependency on a dirstamp file).
+grep '^sub/maude\.c:.*maude\.y' Makefile.in && Exit 1
## Try again with per-exe flags.
# Make sure the .o file is required.
grep '^am_maude_OBJECTS.*maude' Makefile.in
+
+: