Created
April 17, 2017 03:57
-
-
Save devraj/6b839a58a901e9ab756154494fd503e2 to your computer and use it in GitHub Desktop.
Running a command on set of file patterns in Makefiles using Array like structures
This file contains 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
# Must be defined out side a target | |
CONTAINER_DIR=src | |
CLEAN_PATTERNS=*.pyo *.egg *.eggs *.egg-info *~ __pycache__ | |
.PHONY: prep-devel-env | |
prep-devel-env: | |
$(foreach package, $(PACKAGES),(cd $(CONTAINER_DIR)/$(package); $(PIP) install -e .) &&): | |
.PHONY: clean | |
clean: | |
$(foreach package, $(PACKAGES),(cd $(CONTAINER_DIR)/$(package); $(PYTHON35) setup.py clean) &&): | |
$(foreach file_pattern, $(CLEAN_PATTERNS),(find . -name $(file_pattern) -exec rm -f {} +) &&): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment