Created
April 20, 2012 19:34
-
-
Save emoon/2431218 to your computer and use it in GitHub Desktop.
Makefile for building data
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
OUTPUT_DIR := Data | |
INPUT_DIR := OriginalData | |
FOO_IN_FILES = $(wildcard $(INPUT_DIR)/Foo/*) | |
FOO_OUT_FILES = $(patsubst $(INPUT_DIR)/%, $(OUTPUT_DIR)/%, $(FOO_IN_FILES)) | |
$(FOO_OUT_FILES) : $(FOO_IN_FILES) | |
mkdir -p "$(@D)" | |
cp $< $@ | |
.PHONY: all | |
all: $(FOO_OUT_FILES) | |
clean: | |
rm -rf $(OUTPUT_DIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment