Skip to content

Instantly share code, notes, and snippets.

@bodewig
Created November 22, 2015 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bodewig/905283b4c097e2eeb17b to your computer and use it in GitHub Desktop.
Save bodewig/905283b4c097e2eeb17b to your computer and use it in GitHub Desktop.
Makefile with Template Hack
LANGS = de en
all: test-a-de.txt test-b-de.txt test-a-en.txt test-b-en.txt
define test-file-rule
test-%-$(1).txt : select-%.sql
cat $$< > $$@
endef
clean:
rm -f test*.txt
.PHONY: all clean
$(foreach l,$(LANGS),$(eval $(call test-file-rule,$(l))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment