[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8485: Regression in maint: "make distcheck" fails when yacc is used

From: Stefano Lattarini
Subject: bug#8485: Regression in maint: "make distcheck" fails when yacc is used with subdir-objects option
Date: Tue, 12 Apr 2011 14:36:56 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Apparently, in projects using Automake yacc support with the 'subdir-objects'
option enabled, "make distcheck" fails, because in a VPATH build make (even
GNU make) seems unable to find the distributed yacc-generated C files.  This
failure happens only with the developement version of automake, while 1.11
behaves fine.

Here is an incomplete stripped-down example:

  $ cat > configure.in <<'END'
  AC_INIT(x, 0)
  $ cat > Makefile.am <<'END'
  AUTOMAKE_OPTIONS = subdir-objects
  noinst_PROGRAMS = foo
  foo_SOURCES = sub/parse.y
  $ ... # create sub/parse.y here
  $ AUTOMAKE=/path/to/devel/automake ACLOCAL=/path/to/devel/aclocal autoreconf 
  autoreconf: Entering directory `.'
  autoreconf: configure.in: not using Gettext
  autoreconf: running: aclocal 
  autoreconf: configure.in: tracing
  autoreconf: configure.in: not using Libtool
  autoreconf: running: /usr/bin/autoconf
  autoreconf: configure.in: not using Autoheader
  autoreconf: running: automake --add-missing --copy --no-force
  configure.in:5: installing `./compile'
  configure.in:2: installing `./install-sh'
  configure.in:2: installing `./missing'
  Makefile.am: installing `./depcomp'
  configure.in: installing `./ylwrap'
  autoreconf: Leaving directory `.'
  $ ./configure
  $ make
  $ ls sub
  parse.c  parse.y
  $ make distcheck
  rm -rf sub/.deps
  rm -f Makefile
  ERROR: files left in build directory after distclean:
  make[1]: *** [distcleancheck] Error 1
  make[1]: Leaving directory `/tmp/yyy/x-0/_build'
  $ make distclean
  $ mkdir build && cd build
  $ ../configure YACC=false
  $ make
  /bin/sh ../ylwrap ../sub/parse.y y.tab.c sub/parse.c ... -- false  
  make: *** [sub/parse.c] Error 1
  $ make YACC=yacc
  gcc  -g -O2   -o foo sub/parse.o 
  $ ls sub
  parse.c  parse.o

The attached testcase expeses the bug.

Looking at the diffs of the Makefile.in generated by automake-1.11
and automake-maint, I've found only this suspicious difference:

  @@ -544,6 +551,8 @@
  +sub/parse.c: sub/$(am__dirstamp)
   .MAKE: install-am install-strip

which makes me suspect that the regression has been introduced
by commit v1.11-328-ge87c030 "Create subdirs for generated
sources even when not dep tracking."


Attachment: yacc-distcheck-subdir.test
Description: application/shellscript

reply via email to

[Prev in Thread] Current Thread [Next in Thread]