[jamming] Q on "on"

John Panzer jpanzer at netscape.com
Fri Oct 22 12:22:20 PDT 1999


I just ran into a problem using "on", and I'd like to validate my
solution. Here's the problem:  I want to add a library to LINKLIBS for a
particular target, and no others.  The following code sets LINKLIBS for
ex to be _just_ -limsdk, ignoring the global LINKLIBS variable
completely:

----------
LINKLIBS on ex += -limsdk ;

Main ex : ex.cpp ;
----------

If I manually include the global LINKLIBS, it seems to work:

----------
LINKLIBS on ex = $(LINKLIBS) -limsdk ;
----------

I had naively expected that "LINKLIBS on ex" would have a default value
equal to $(LINKLIBS), but it looks like the default is no value.  Is
this the right thing to do?  As a side question, is there a way to print
out the value of LINKLIBS on ex for debugging purposes?  I usually use
ECHO to see selected variables, but I can't get ECHO to print out
$(LINKLIBS on ex) or "$(LINKLIBS) on ex".

Thanks,

John Panzer







More information about the jamming mailing list