On Tuesday 26 July 2005 14:10, Dave Hylands wrote: > Hi Angus, > > > $(objdir)/%.h: $(srcdir)/%.ui > > $(objdir)/%.moc: $(srcdir)/%.h > > > > However, here's the rub. When my srcdir != buildir the generated > > .h files are not in the srcdir and so the .h -> .moc step is > > failing. For obvious reasons. > > You need to decide where you want your headers to go and and use > the SAME thing to describe your headers. > > You've used $(objdir)/%.h in one instance and $(srcdir)/%.h in the > second. Either that or you're going to have to add a rule like: > > ifneq($(srcdir),$(objdir)) > $(srcdir)/%.h : $(objdir)/%.h > cp $< $@ > endif
Urggggssss! ;-) > > Why is it removing these (generated in two steps) .moc files: > > .ui -> .h > > .h -> .moc > > Declare the .moc files as precious (see the section in the make > documentation on intermediate files): > > .PRECIOUS: $(objdir)/%.moc Bingo! Thank you. Angus _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
