bug-make
[Top][All Lists]
Advanced

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

feature request: $(wildcard) file type filter


From: Ed Hutchins
Subject: feature request: $(wildcard) file type filter
Date: Fri, 27 Sep 2013 11:56:54 -0700

I've recently come up with a nifty way to detect subdirectories:

ALLFILES := $(notdir $(wildcard $(d)/*))
# figure out which files are subdirs by wildcarding on <test>/.
SUBDIRS := $(notdir $(patsubst %/.,%,$(wildcard $(addprefix
$(d)/,$(addsuffix /.,$(ALLFILES))))))

This is useful for scanning whole directory trees automatically, for example.

It would be a lot simpler to support posix find -type style qualifiers
on on $(wildcard):

$(wildcard <patterns>[,<filter>])

where filter is 'f' for plain files, 'd' for directories, 'l' for links, etc.

  - Ed



reply via email to

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