Last active
July 24, 2019 20:50
-
-
Save wknapik/94582e964321af704d30c25ccbbf7320 to your computer and use it in GitHub Desktop.
A declarative, recursive find implementation in pure make.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example usage: $(call find,. /foo,*.bar *.baz) | |
find = $(foreach path,$1,$(foreach pattern,$2,$(wildcard $(path)/$(pattern)) $(foreach dir,$(wildcard $(path)/*/),$(call find,$(dir:%/=%),$(pattern))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment