From fa9a04b06a7c6f62979c506b9999abf6b2eb8208 Mon Sep 17 00:00:00 2001
From: Rob Austein <sra@hactrn.net>
Date: Sun, 10 Mar 2019 13:46:08 -0400
Subject: First public version.

---
 Makefile | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Makefile

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..dea4629
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+SRC := $(wildcard demo[0-9])
+BIN := $(addsuffix .zip,${SRC})
+
+all: ${BIN}
+
+%.zip: pyzipper Makefile
+	${PYTHON} ./pyzipper $(if $(PYTHON),-e $(PYTHON)) -o $@ $*
+	./$@
+
+clean:
+	git clean -dfx
+
+.PHONY: all clean
+
+GIT_LS_TREE := $(shell git ls-tree --name-only -r HEAD)
+
+define DEPENDENCIES
+$(1).zip : $$(filter $(1)/%,$${GIT_LS_TREE})
+endef
+
+$(foreach S,${SRC},$(eval $(call DEPENDENCIES,$(S))))
-- 
cgit v1.2.3