Is there any way to dynamically generate vpath directives?

I'd like to take the link line which looks sort of like this:

LIBS = -L/auto/lib/oracle/7.3.4.4.0 -L/auto/lib -L/lib -lsubslib -loroe \
-lcrtlib -ltermcap -ldate -lutil -lsqlgen -lpsclib -lbitrange -lbcf -lstr \
-lrgetrotate -lrpc \

And generate something like this:

vpath %.a /auto/lib/oracle/7.3.4.4.0
vpath %.so /auto/lib/oracle/7.3.4.4.0

vpath %.a /auto/lib
vpath %.so /auto/lib

vpath %.a /lib
vpath %.so /lib

I can dynamically create the VPATH variable:

VPATH = $(subst -L,,$(sort $(filter -L%,$(LIBS))))

and that works, but setting VPATH allows gmake to go searching for missing
files other then libraries in VPATH directories and I don't want it to
do that.  I was thinking that since vpath can be based on file extension
that I would use that, but since it's a directive, I don't see how I can
generate it dynamically without getting messy with sed and including a
file or something.

Michael Sterrett
  -Mr. Bones.-
[EMAIL PROTECTED]

Reply via email to