automake
[Top][All Lists]
Advanced

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

tracking dependencies of built sources


From: dherring
Subject: tracking dependencies of built sources
Date: Tue, 31 Mar 2009 12:00:37 -0400 (EDT)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

Hi all,

I'm using Qt 4's moc to generate source files in an autotools project.

The pattern looks something like

cat <<_EOF > Makefile.am
# Makefile fragment
bin_PROGRAMS=test
test_SOURCES=a.cpp b.cpp
test_META=a.hpp b.hpp
test_SOURCES+=$(test_META)
test_LDADD = $(test_META:%.hpp=%_moc.$(OBJEXT))

%_moc.cpp : %.hpp
        $(QT_MOC) -o $@ $<
_EOF


This all works fine for building the project, but it doesn't track dependencies for the moc source files properly. The dependencies are getting dropped in $(DEPDIR)/*_moc.Po, but the Makefile doesn't have any lines which actually include them.

Here's an extract from the fictitious Makefile generated by the above input.

<<
distclean-compile:
        -rm -f *.tab.c

include ./$(DEPDIR)/a.Po
include ./$(DEPDIR)/b.Po

.cpp.o:


What automake incantation do I need to get this to also say
<<
include ./$(DEPDIR)/a_moc.Po
include ./$(DEPDIR)/b_moc.Po

?

These files are being generated, but the makefile never uses them, leading to subtle recompilation errors...


Thanks,
Daniel




reply via email to

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