automake
[Top][All Lists]
Advanced

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

Re: tracking dependencies of built sources


From: dherring
Subject: Re: tracking dependencies of built sources
Date: Wed, 1 Apr 2009 13:20:17 -0400 (EDT)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

Never mind. Sometimes it is bad to work late at night. I had convinced myself the following did not work.


For the record, here's the fixed makefile

On Tue, 31 Mar 2009, address@hidden wrote:
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 $@ $<

$(DEPDIR)/%_moc.Po :
        @touch $@
include $(test_META:%.hpp=$(DEPDIR)/%_moc.Po)

_EOF


The main problem with this is that it spews warnings about missing deps files the first time make is run. It would be nice to properly hook into configure's depfiles command to avoid these warnings. Likewise configure is generating a bogus file named ".deps/$(test_META:%.hpp=%_moc.Po". Otherwise it seems to work.

Later,
Daniel




reply via email to

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