help-make
[Top][All Lists]
Advanced

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

Re: prerequisite variable confusion


From: Karl Hegbloom
Subject: Re: prerequisite variable confusion
Date: Mon, 30 Apr 2007 11:43:10 -0600

On Mon, 2007-04-23 at 20:17 -0400, Ron Peterson wrote:
> On Mon, Apr 23, 2007 at 03:08:48PM -0400, Ron Peterson wrote:
> 
> > In the following snippet, the first time I run 'make session_module.so'
> > it will get as far as making session.o, and then stop with the error:
> 
> > OBJFILES := session.o soapServer.o soapC.o stdsoap2.o wslib.o
> > 
> > %.o: %.cpp soapH.h
> >     $(CXX) $*.cpp -c -o $@ $(YCFLAGS)
> 
> I kind of figured it out, but I could still use some advice about how to
> best handle this.
> 
> The soapH.h target builds a bunch of .cpp files like soapServer.cpp
> that should then be compiled into object files.  If those files don't
> exist when the makefile is called, then it seems that even though
> there's a rule that makes them, the rule I made for the %.o target
> doesn't know they exist.

I wonder if it will do what you mean if you tell it:


  $(OBJFILES) : %.o : %.cpp soapH.h
        $(CXX) $*.cpp -c -o $@ $(YCFLAGS)


Hmmm... maybe that's not enough information.  Perhaps you also need to
declare the other files built by the soapH.h target:

  $(GENERATED_CPP) soapH.h : $(SOAPH_H_DEPS)
        : the commands...

Does that give it enough?






reply via email to

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