bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$(wildcard ...*/) and symlinks


From: Frank Heckenbach
Subject: $(wildcard ...*/) and symlinks
Date: Fri, 24 Feb 2023 12:54:58 +0100

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 ...*/.))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]