This is something of a trick question, for which I apologize.
The trick comes from the UNIX® definition of a suffix, which
PMake does not necessarily share.
You will have noticed that all the suffixes used in this tutorial
(and in UNIX® in general) begin with a period
(.ms
, .c
, etc.).
Now, PMake's idea of a suffix is more
like English's: it is the characters at the end of a word. With
this in mind, one possible solution to this problem goes as
follows:
The trick to this one lies in the :=
variable-assignment operator and the :S
variable-expansion modifier. Basically what you want is to take
the pointer variable, so to speak, and transform it into an
invocation of the variable at which it points. You might try
something like:
which places $(
at the front of the
variable name and )
at the end, thus
transforming VAR,
for example, into
$(VAR)
, which is just what we want.
Unfortunately (as you know if you have tried it), since, as it
says in the hint, PMake does no further
substitution on the result of a modified expansion, that is all
you get. The solution is to make use of :=
to
place that string into yet another variable, then invoke the other
variable directly:
You can then use $(*PTR)
to your heart's
content.
This, and other documents, can be downloaded from http://ftp.FreeBSD.org/pub/FreeBSD/doc/
For questions about FreeBSD, read the
documentation before
contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.