summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-07-04 15:16:26 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-07-04 15:16:26 +0200
commit157c8d99ebae07a2afaa45ede964b6ab9cf9fa8c (patch)
treeb6aeb3aee229bb9abdafe55e05097e6b550abba2 /Makefile
parent27117c6b3c0b0db68a21428302c5a0928533dea6 (diff)
downloadalpine-mksite-157c8d99ebae07a2afaa45ede964b6ab9cf9fa8c.tar.bz2
alpine-mksite-157c8d99ebae07a2afaa45ede964b6ab9cf9fa8c.tar.xz
add makefile and initial test data
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5265ecd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+
+out := _out
+md_sources := $(wildcard *.md) $(wildcard [a-z]*/*.md)
+pages := $(patsubst %.md,$(out)/%.html, $(md_sources))
+
+static_sources := $(shell find _static -type f)
+static_out := $(patsubst _static/%,$(out)/%,$(static_sources))
+
+all: $(pages) $(static_out)
+
+$(out)/%.html: %.md _layout.template.html
+ mkdir -p $(dir $@)
+ lua _scripts/generate_page.lua $< > $@
+
+$(static_out): $(out)/%: _static/%
+ mkdir -p $(dir $@)
+ cp $< $@
+
+clean:
+ rm -f $(pages) $(static_out)