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 _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make