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