Found it. Just in case someone stumbles upon this (seems there is not much activity here), here is what I did. It has something to do with the automatic variable scope. I don't fully understand it, but this is the solution to the problem
.SECONDEXPANSION:
$(OBJS): %.html: %.in $$(wildcard *.$$*)
do_it $<
For target sample.html, it depends on sample.in and on all files *.sample in
the directory.
Ruud
