GNU Make 4.4.0.91
Run from an otherwise empty directory:
% cat Makefile
all: prepare
echo $(wildcard */)
echo $(wildcard l*/)
echo $(wildcard */*/)
prepare:
mkdir -p d/d
touch f d/f
ln -sf f l
ln -sf f d/l
% make -s
d/
l
d/d/ d/l
%
So "*/" ignores the symlink to a file as expected, but "l*/" does
return it, likewise "*/*/" which doesn't make much sense to me.
Maybe related to the issues discussed on
https://stackoverflow.com/questions/66271761/gnu-make-wildcard-function-and-terminating-slashes-on-directory-names
The workaround given there, adding a dot (and removing it from the
results), seems to help, i.e.:
$(patsubst %/., %, $(wildcard ...*/.))