Hello,

You are correct; I am using GNU make, err, rather, trying to, at least.
Found a typo that fixed part of the problem: $(addprefix, PREFIX, ITEM)
should be $(addprefix PREFIX, ITEM). Note that there is no comma after
'addprefix'. 

This particular Makefile seems to be horribly broken. So I think I might
as well start over. Further reading shows that the 'vpath' directive
should be used in this case, or '.PATH' for BSD make. 

Thanks for the suggestion at least...

-Andrew

On Mon, 2006-05-22 at 18:45 -0400, Parv wrote:
> in message <[EMAIL PROTECTED]>,
> wrote Andrew thusly...
> >
> > I'm trying to use $(addprefix) build lists of source files and
> > object files containing the relative paths for each. The problem
> > is that $(addprefix) never seems to be evaluated. When I run 'make
> > -p', $OBJECT_LIST looks exactly like in does in my Makefile, which
> > is listed below.
> ...
> > #### Begin Makefile ####
> > 
> > ## compiler settings
> > CC = gcc
> > OPTIONS = -Wall -g
> > 
> > ## directory layout
> > BASEDIR = ../alice
> > SOURCEDIR = $(BASEDIR)/sources
> > OBJECTDIR = $(BASEDIR)/objects
> > DOCSDIR = $(BASEDIR)/documentation
> ...
> > SOURCES_LIST = $(addprefix, $(SOURCEDIR), $(SOURCE))
> > OBJECTS_LIST = $(addprefix, $(OBJECTDIR), $(OBJECTS))
> > 
> > ## targets
> > alice: $(OBJECT_LIST)
> >         $(CC) $(OPTIONS) -o $@ $(OBJECT_LIST)
> ...
> 
> Looks like you are using gnu make syntax.
> 
> Read make(1) man page.  Replace $(VAR) with ${VAR} & see what
> happens (i am unsure as i am a light user of BSD make).
> 
> 
>   - Parv
> 

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to