I'm confused by the following:

Suppose I declare in a *.jam file a target as follows:

type.register CS : cs ;
type.register CSEXE : exe ;

generators.register-composing csc.make-exe : CS : CSEXE ;
feature reference : : free path dependency ;
flags csc.make-exe CSREFERENCE <reference> ;

actions make-exe bind CSREFERENCE
{
  csc -target:exe -r:$(CSREFERENCE) -out:$(<) $(>)
}

rule link
{
  DEPENDS $(<) : [ on $(<) return $(CS_REFERENCE) ] ;
}

and a Jamfile that has this:

csexe test : test.cs
              : <reference>../distribution/shared.dll
              ;

and I do "b2  test" inside that directory

Naively, I would think that the action would expand to 

csc target:exe -r:../distribution/shared.dll ....

which is what I want.

However, what I am really getting, based on the error messages is:

csc target:exe -r:bin/darwin-4.2.1/release/address-model-64/threading-multi/../distribution/shared.dll ....

What am I doing wrong?