The manual is misleading, possibly due to a typo. The first of the two sentences:
The $$< variable evaluates to the first prerequisite in the first rule for this target. $$^ and $$+ evaluate to the list of all prerequisites of rules that have already appeared for the same target ($$+ with repetitions and $$^ without).
should be be qualified, like the second, by appending the words: "that has already appeared".
You can verify that this correctly describes the behaviour by running two makefiles:
Make 1
.SECONDEXPANSION:
foo: foo.1 $$<
@echo $+
The output is:
foo.1
showing that $$<
has expanded to the empty string. Then:
Make 2
.SECONDEXPANSION:
foo: foo.1
foo: foo.2 $$<
@echo $+
Now the output is:
foo.2 foo.1 foo.1
Here, the explicit prerequisites foo.1
and foo.2
from the first and second
rules for target foo
are combined, which accounts for the initial foo.2 foo.1
of the output. And in addition, $$<
in the second rule is expanded to the first
prerequisite foo.1
of the previous rule, which accounts or the final foo.1
of the output.