Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a macro to ignore file patterns in calls to find in the recipies #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peanutbutterandcrackers
Copy link

Instead of explicit -not -name "pattern1" -not -name "pattern2" -not -name "pattern3" as the $(shell find ...) calls currently stand, this change introduces a small macro findn't which will generate the -not -name "pattern" part for every pattern in the list of patterns passed to it.

make --just-print > my_changes
git checkout origin/master
make --just-print > original
diff -s original my_changes # both files are identical: i.e. this change doesn't break anything

A target-local variable find-ignore is $(eval ...)-ed in the recipe of the necessary targets that is set to a space-separated list of file patterns to ignore so as to not pollute the makefile.

Additional patterns to ignore can simply be added to the find-ignore variable, and without quotes.

P. S: If you ever get around to seeing this, then Ms. Frazelle, I greatly admire your work. And this repository has been the main influence for my own dot-files repository. Using make to mange dotfiles using symlinks is such a great idea. Thank you for making this repo public for us to see/study/learn from. You're super awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant