Hello Craig,
* Craig Sanders wrote on Mon, Dec 08, 2008 at 01:47:25AM CET:
> To be honest, I also thought that there might have been a more elegant
> way in which to implement the custom rule for invoking the Qt Meta
> Object Compiler (moc) on the C++ source code files. That is, the rule
> which I have quoted below.
>
> .hpp.cpp:
> @echo ""
> @echo "----------------------------------------"
> @echo "moc is creating the file : [EMAIL PROTECTED]"
> @echo "... in directory : [EMAIL PROTECTED]/"
> @echo "... from input file : $< "
> @echo "$<"
> @echo ""
> ${QT_MOC} -o [EMAIL PROTECTED] $<
>
> You couldn't recommend a more elegant way in which to accomplish this
> task could you?
Not really. That's how we do it as well:
.h.moc:
$(MOC) -i $< -o $@
I don't see it as ugly though. It's a normal makefile inference rule,
and as such the canonical way to extend Automake functionality.
Cheers,
Ralf