summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2009-10-21 02:02:35 +0200
committerJonas Smedegaard <dr@jones.dk>2009-10-21 02:02:35 +0200
commit42e381a1c8769bb7165e9745f1d5bdc793a3dc4b (patch)
treefda10b4582a033d2ae5e2b9cbc9a4c24b1a415b7 /Makefile
Initial commit...
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d4eab9b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+SRCDIR ?= .
+STATICSRCDIR ?= $(SRCDIR)
+BUILDDIR ?= $(SRCDIR)
+DESTDIR ?= /home/arrrgh/public_html
+
+remotehost ?= example.org
+
+# Pull title, author and creationdate from this Markdown file
+metahintfile = $(SRCDIR)/chap0.mdwn)
+
+s5opts = -i
+
+# source docs
+s5file = $(SRCDIR)/ezgo.mdwn
+reportfiles = $(filter-out $(s5file), $(mdwnfiles))
+#reportfiles = $(patsubst %,$(SRCDIR)/chap%.mdwn,0 1 2 2a 2b 3 4 5)
+
+s5 = $(BUILDDIR)/index.html
+htmlreports = $(reportfiles:$(SRCDIR)/%.mdwn=$(BUILDDIR)/%.html)
+#htmlreports = $(BUILDDIR)/report.html
+#pdfreports = $(BUILDDIR)/report.pdf
+
+#extrafiles += $(patsubst %,$(BUILDDIR)/%.pdf,deps pkgdeps)
+
+#htmlcopyfiles = $(BUILDDIR)/map.png
+#pdfcopyfiles = $(BUILDDIR)/map.pdf
+#javacopyfiles = $(patsubst %,$(BUILDDIR)/map/%,freemindbrowser.jar index.html map.mm IBIS_MemberDB.zip)
+
+all: $(s5) $(htmlreports) $(pdfreports) $(javacopyfiles) $(extrafiles)
+
+install: all
+ for f in $(installfiles:$(BUILDDIR)/%=%); do \
+ install -d $(DESTDIR)/`dirname $$f`; \
+ install -p -m u=rw,go=r,a-s -t $(DESTDIR)/`dirname $$f` $(BUILDDIR)/$$f; \
+ done
+
+uninstall:
+ rm -f $(installfiles:$(BUILDDIR)/%=$(DESTDIR)/%)
+
+clean:
+ rm -f $(copyfiles) $(genfiles) $(filter-out $(maybecopyfiles),$(installfiles) $(noinstallfiles))
+ rm -f $(pdfreports:=~)
+
+sync: install
+ rsync -avH $(DESTDIR)/ $(remotehost):$(DESTDIR)/
+
+include make/pandoc.mk