From 7fbe2044737afc48d8641e525fafb24b5ed07145 Mon Sep 17 00:00:00 2001 From: Samuel Walladge Date: Thu, 2 May 2019 00:01:42 +0930 Subject: [PATCH 1/2] Add makefile This makefile is generalized so that it should work even if the user adds or renames the .erb template file(s). --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2afd6db --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + +ERB_SOURCES = $(wildcard colors/*.erb) +VIM_OUTPUTS = $(ERB_SOURCES:%.erb=%.vim) + +.PHONY: all + +all: $(VIM_OUTPUTS) + +%.vim: %.erb + erb -T - $< > $@ From 35e206d371479613509a5fb78f60f9feec97cf8b Mon Sep 17 00:00:00 2001 From: Samuel Walladge Date: Thu, 2 May 2019 00:07:26 +0930 Subject: [PATCH 2/2] inline make targets logic --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2afd6db..0246d8d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ -ERB_SOURCES = $(wildcard colors/*.erb) -VIM_OUTPUTS = $(ERB_SOURCES:%.erb=%.vim) +VIM_OUTPUTS = $(patsubst %.erb,%.vim,$(wildcard colors/*.erb)) .PHONY: all