help-make
[Top][All Lists]
Advanced

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

RE: Help w/ OBJECT_DIR


From: Steve deRosier
Subject: RE: Help w/ OBJECT_DIR
Date: Wed, 23 Oct 2002 14:20:00 -0700

Paul,

Thanks.  Sorry about not putting in the version number (3.79.1 BTW), I
thought I had put it in there somewhere. I downloaded and installed 3.80.
Didn't fix the problem, but I did find the problem anyway.

As it turns out it was in another include I had done, where the dependencies
were taken care of.  There was another variable that needed to be set
properly and not having it was playing havoc with my make.  Thanks for you
help, it got me pointed away from what I was thinking was the problem and
actually got me looking in the right place.

- Steve


> -----Original Message-----
> From: Paul D. Smith [mailto:address@hidden Behalf Of
> Paul D. Smith
> Sent: Tuesday, October 22, 2002 7:09 PM
> To: Steve deRosier
> Cc: Make List
> Subject: Re: Help w/ OBJECT_DIR
>
>
> When asking for help or reporting a problem, please _always_ provide the
> version number of the software you're using, and the type of system
> you're running it on.
>
> If you're not using the latest, GNU make 3.80, then please upgrade to
> that version and try again.
>
>
> There is no special handling of a variable OBJECT_DIR in GNU make, nor
> is there special handling of _any_ variable that might result in the
> behavior you're seeing.
>
> Note that this, however:
>
>   OBJECTS = $(OBJECT_DIR)/5407.o $(OBJECT_DIR)/entry.o
> $(OBJECT_DIR)/init.o \
>   $(OBJECT_DIR)/main.o $(OBJECT_DIR)/vectors.o
>
>   #
>   # GENERATION RULES
>   #
>   .SUFFIXES: .cpp .c .s
>
>   .cpp.o:
>           $(dplus) $(INCLUDE) $*.cc
>           -mv -f $*.lst ./List/.
>     ...etc...
>
> will not work if the value of OBJECT_DIR is anything _other_ than ".".
> A suffix rule like ".cpp.o" tells make how to build a file XXX.o from a
> file XXX.cpp--but suppose OBJECT_DIR=objdir.  Now you want to build a
> file objdir/XXX.o, so make will only use your rule if there is an
> objdir/XXX.cpp, which there probably isn't.
>
>
> Also, don't forget to add ".o" to the .SUFFIXES list above; _both_
> elements of the suffix must be defined to make it a suffix rule (note
> that the default .SUFFIXES list already contains these suffixes, though,
> so unless you're clearing it first it doesn't matter).
>
> --
> ------------------------------------------------------------------
> -------------
>  Paul D. Smith <address@hidden>          Find some GNU make tips at:
>  http://www.gnu.org                      http://make.paulandlesley.org
>  "Please remain calm...I may be mad, but I am a professional."
> --Mad Scientist





reply via email to

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