summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile48
1 files changed, 48 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e9d65cc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,48 @@
+#
+# willora-docs Makefile
+# Charlotte Koch <charlotte@magentastripe.com>
+#
+# ==================================================
+#
+# Use this Makefile to generate the Willora Guide.
+#
+
+BUNDLE?= bundle33
+RUBY?= ruby33
+
+SECTIONS= # defined
+SECTIONS+= guide/hello.adoc
+
+########## ########## ##########
+
+.PHONY: all
+all: guide.pdf
+
+CLEANFILES+= guide.pdf
+guide.pdf: Gemfile.lock total.adoc
+ ${BUNDLE} exec asciidoctor-pdf \
+ -b pdf \
+ -d book \
+ -o ${.TARGET} \
+ total.adoc
+
+CLEANFILES+= total.adoc
+total.adoc: ${SECTIONS}
+ echo > ${.TARGET}
+.for section in ${SECTIONS}
+ cat ${section} >> ${.TARGET}
+ echo >> ${.TARGET}
+ echo >> ${.TARGET}
+.endfor
+
+########## ########## ##########
+
+Gemfile.lock: Gemfile
+ ${BUNDLE} config set --local path ./vendor
+ ${BUNDLE} install
+
+########## ########## ##########
+
+.PHONY: clean
+clean:
+ rm -rf ${CLEANFILES}