Created
June 14, 2017 10:05
-
-
Save chadyred/e29611e3449085a96ebddaa050468173 to your computer and use it in GitHub Desktop.
Make recursion subfolder
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
PUBLIC_DIR := public | |
SRC_DIR := src | |
CP := $(which cp) | |
RM := $(which rm) | |
PROJECTS_SRC := $(wildcard $(SRC_DIR)/*) | |
PROJECTS_PUBLIC := $(subst $(SRC_DIR)/,$(PUBLIC_DIR)/,$(PROJECTS_SRC)) | |
install: $(PROJECTS_SRC) | |
$(PROJECTS_SRC): clear/$(PUBLIC_DIR) | |
$(MAKE) -C $@ | |
cp -r $@ $(subst clear/,,$<) | |
$(PUBLIC_DIR): | |
mkdir -p $(PUBLIC_DIR) | |
clear/$(PUBLIC_DIR): | $(PUBLIC_DIR) | |
rm -rf $(PUBLIC_DIR)/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment