Zvezdan Petkovic wrote:
> Even worse is the third case we have there:
> 
> %.C: %.h %.ui
> $(UIC) $(UICFLAGS) -impl $^ -o $@
> 
> This is basically, telling that you make X.C file using X.h file,
> but
> they also depend on X.ui.  You can't do that with suffix rules.
> 
> .h.C: X.ui
> 
> is a wrong syntax.  Plus, X has to be different every time.

I remember a chat I had with Paul Smith on the gnu-make list. 
Basically, he suggested that if I *had* to use a syntax common to all 
makes then the only way was

.C:.ui
        $${HEADER}=... \     (can't remember the syntax ;-)
        $(UIC) $(UICFLAGS) $< -o $${HEADER} \
        $(UIC) $(UICFLAGS) -impl $${HEADER} $< -o $@

Ie, generate the header file as a by-product of generating the .C 
file. Could I get you to investigate this some more? That would leave 
only the "%_moc.C: $(srcdir)/../%.h" rule to think about more deeply.

> BSD make saves the day with the .for loop.
> Is there something like that in SysV make.
> I don't really remember.  Last time I used SysV make was back in
> 1995.
> :-)

-- 
Angus

Reply via email to