Skip to content

Instantly share code, notes, and snippets.

@emoon
Created April 20, 2012 19:34
Show Gist options
  • Save emoon/2431218 to your computer and use it in GitHub Desktop.
Save emoon/2431218 to your computer and use it in GitHub Desktop.
Makefile for building data
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