help-make
[Top][All Lists]
Advanced

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

Use of %


From: Erik Elliott
Subject: Use of %
Date: Thu, 19 Jul 2001 17:40:43 -0500

I am trying to port a large project from Solaris to Linux.
In one of the many makefiles, there is a line that looks like this:

STDCOMOBJS= $(COMMONSRCS:%.cxx=$(STDOBJDIR)/%/%.o)

where commonsrcs is a list of source files and stdobjdir is the directory to
put the object files.
Under solaris this would turn into something like this:

if COMMONSRCS = filename.cxx
STDCOMOBJS=$(STDOBJDIR)/filename/filename.o

but with GNU make it only turns into

STDCOMOBJS=$(STDOBJDIR)/filename/%.o

How can I make the pattern substitution happen more than the one time that
it wants to?



reply via email to

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