automake
[Top][All Lists]
Advanced

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

subdir-objects, dirstamps and --disable-dependency-tracking (bug?)


From: Ignacy Gawedzki
Subject: subdir-objects, dirstamps and --disable-dependency-tracking (bug?)
Date: Wed, 30 Mar 2011 00:03:09 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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

-- 
I used to have a sig, but I've stopped smoking now.

Attachment: automake-dirstamp-bug.tar.gz
Description: Binary data


reply via email to

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