|
List Info
Thread: prerequisite variable confusion
|
|
| prerequisite variable confusion |
  United States |
2007-04-23 14:08:48 |
Hi,
I'm using gnu make 3.81beta4.
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:
make: *** No rule to make target `soapServer.o', needed by
`module'. Stop.
Then, if I run the same 'make session_module.so' again, it
will
dutifully make all the remaining object files and then make
session_module.so.
Why does this stop the first time, but work the second?
TIA.
-
OBJFILES := session.o soapServer.o soapC.o stdsoap2.o
wslib.o
%.o: %.cpp soapH.h
$(CXX) $*.cpp -c -o $ $(YCFLAGS)
session_module.so: $(OBJFILES)
$(CXX) -o $ $(OBJFILES) $(YTFLAGS) $(YFLAGS)
$(SFLAGS)
--
Ron Peterson
https://www.yellowbank.co
m/
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|
|
| Re: prerequisite variable confusion |
  United States |
2007-04-23 19:17:59 |
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 kludged it like this:
all:
$(MAKE) soapH.h
$(MAKE) therest
therest: session_module.so ...
Is there a more elegant way to accomplish the same thing?
--
Ron Peterson
https://www.yellowbank.co
m/
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|
|
| Re: prerequisite variable confusion |

|
2007-04-23 23:02:25 |
On 4/23/07, Ron Peterson <ron.peterson yellowbank.com> wrote:
...
> 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.
...
> Is there a more elegant way to accomplish the same
thing?
This was discussed a couple weeks ago on this very list:
http://lists.gnu.org/archive/html/help-make/200
7-04/msg00021.html
BTW, you should also upgrade your make binary from 3.81beta4
to the
released version of 3.81, just in case you (later) hit
someone fixed
before the release.
Philip Guenther
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|
|
| Re: prerequisite variable confusion |
  United States |
2007-04-24 08:32:16 |
On Mon, Apr 23, 2007 at 10:02:25PM -0600, Philip Guenther
wrote:
> On 4/23/07, Ron Peterson <ron.peterson yellowbank.com> wrote:
> ...
> >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.
> ...
> >Is there a more elegant way to accomplish the same
thing?
>
> This was discussed a couple weeks ago on this very
list:
>
> http://lists.gnu.org/archive/html/help-make/200
7-04/msg00021.html
Thanks. I think I'll continue using my own kludge so I
don't have to
create extraneous files... Oh well.
> BTW, you should also upgrade your make binary from
3.81beta4 to the
> released version of 3.81, just in case you (later) hit
someone fixed
> before the release.
Yeah, I already did that mostly because I was hoping for a
miracle cure.
Best.
--
Ron Peterson
https://www.yellowbank.co
m/
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|
|
| Re: prerequisite variable confusion |
  United States |
2007-04-30 12:43:10 |
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?
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|