GNU bug report logs - #9859
subdir-objects, dirstamps and --disable-dependency-tracking

Previous Next

Package: automake;

Reported by: Ignacy Gawedzki <i <at> lri.fr>

Date: Mon, 24 Oct 2011 17:50:01 UTC

Severity: normal

Tags: confirmed

Merged with 27188

To reply to this bug, email your comments to 9859 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#9859; Package automake. (Mon, 24 Oct 2011 17:50:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Mon, 24 Oct 2011 17:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: subdir-objects, dirstamps and --disable-dependency-tracking
Date: Mon, 24 Oct 2011 19:47:40 +0200
[Message part 1 (text/plain, inline)]
Hello automakers.

The recent commit `v1.11-512-g40c3432', required to fix automake bugs #8485
and #8526, has re-introduced the bug reported by Ignacy Gawedzki in his
message "subdir-objects, dirstamps and --disable-dependency-tracking (bug?)",
posted to the automake list in March 2011.  I'm thus registering this
bug in the automake tracker so that we won't forget about it.

Regards,
  Stefano

-*-*-*-

Reference:
 <http://lists.gnu.org/archive/html/automake/2011-03/msg00124.html>
a.k.a.:
 <http://thread.gmane.org/gmane.comp.sysutils.automake.general/12768>

-*-*-*-

Original message follows ...

-*-*-*-

Hi,

I suspect I found a bug in automake 1.11.1 .

I have a project in which some program has .ll and .yy sources that must be
generated by flex and bison.  It also happens I need to have specific
preprocessor options passed to that program using a _CPPFLAGS variable.  This
makes everything produced for that program prefixed with the program name.
Besides, I need to use the subdir-objects automake option.

Now the problem is that some subdirectories are not created automatically in
$(builddir) as expected and I think I have found why.  It happens when
configure is called with --disable-dependency-tracking, as is usually the case
when called through debhelper.

In the attached tarball, there is a minimal setup illustrating the problem.
Try to configure and build the project in a separate build directory and you
should be able to observe how automake fails to create $(builddir)/src before 
calling ylwrap to generate src/bug-scanner.cc .

The Makefile has the following rule (number 1):

  src/bug-scanner.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)

But the bug_CPPFLAGS line in Makefile.am ultimately leads to the production of
the following rule (number 2):

  src/bug-scanner.o: src/scanner.cc
        ...

Whereas there is *no* rule of the kind :

  src/scanner.cc: src/$(am__dirstamp)
        ...

This looks like src/scanner.cc gets regenerated *before* src/$(am_dirstamp)
gets a chance to be considered, supposedly because of the explicit rule number
2.

Does anybody know of a clean fix/workaround?

Thanks.

Ignacy
[Message part 2 (text/html, inline)]
[automake-dirstamp-bug.tar.gz (application/x-compressed-tar, attachment)]

Changed bug submitter to 'Ignacy Gawedzki <i <at> lri.fr>' from 'Stefano Lattarini <stefano.lattarini <at> gmail.com>' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 24 Oct 2011 17:55:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#9859; Package automake. (Fri, 03 Feb 2012 13:37:01 GMT) Full text and rfc822 format available.

Message #10 received at 9859 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: 9859 <at> debbugs.gnu.org
Cc: Ignacy Gawedzki <i <at> lri.fr>
Subject: automake bug#9859 has been fixed in Automake-NG
Date: Fri, 03 Feb 2012 14:35:31 +0100
JFTR: this bug has been fixed in the Automake-NG fork of Automake
(which assumes GNU make is used to execute its generated makefiles);
see commits v1.11-1838-gdc04691 "[ng] yacc, lex: fix subdir VPATH
builds" and v1.11-1839-ge5b964c "[ng] yacc, lex, compiling: better
use of '$<' (simplify and fix bug)" in the 'ng/master' branch of
the official automake repository.

See also:

 <http://lists.gnu.org/archive/html/automake-ng/2012-02/msg00003.html>
 <http://lists.gnu.org/archive/html/automake-ng/2012-02/msg00011.html>

More information about Automake-NG, from its first git commit:

  <http://lists.gnu.org/archive/html/automake-ng/2011-12/msg00000.html>

Regards,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#9859; Package automake. (Fri, 04 Dec 2015 16:29:03 GMT) Full text and rfc822 format available.

Message #13 received at 9859 <at> debbugs.gnu.org (full text, mbox):

From: Nicholas Brown <brownn <at> brocade.com>
To: <9859 <at> debbugs.gnu.org>
Subject: [PATCH] yacc and lex built objects without dependancy tracking
Date: Fri, 4 Dec 2015 14:09:36 +0000
---
 lib/am/lex.am  | 1 +
 lib/am/yacc.am | 1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/am/lex.am b/lib/am/lex.am
index d7ddc77..6357507 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -23,6 +23,7 @@ endif %?MAINTAINER-MODE%
 
 ?GENERIC?%EXT%%DERIVED-EXT%:
 ?!GENERIC?%OBJ%: %SOURCE%
+?SUBDIROBJ?	%SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
 ?GENERIC?	%VERBOSE%$(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
 ?!GENERIC?	%VERBOSE% \
 ?!GENERIC??DIST_SOURCE?	$(am__skiplex) \
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 2b3f92a..2c33023 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -43,6 +43,7 @@ endif %?FIRST%
 
 ?GENERIC?%EXT%%DERIVED-EXT%:
 ?!GENERIC?%OBJ%: %SOURCE%
+?SUBDIROBJ?	%SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@)
 ?GENERIC?	%VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
 ?!GENERIC?	%VERBOSE% \
 ?!GENERIC??DIST_SOURCE?	$(am__skipyacc) \
-- 
2.1.4





Merged 9859 27188. Request was from Mathieu Lirzin <mthl <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 17 Jun 2017 21:45:01 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Mathieu Lirzin <mthl <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 18 Jun 2017 11:28:02 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.