summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hs/Makefile47
-rw-r--r--hs/README.md17
2 files changed, 64 insertions, 0 deletions
diff --git a/hs/Makefile b/hs/Makefile
new file mode 100644
index 0000000..edc5e38
--- /dev/null
+++ b/hs/Makefile
@@ -0,0 +1,47 @@
+.PHONY: all clean dist install
+
+HS_FILES=src/main.hs \
+ src/Config.hs \
+ src/Files.hs \
+ src/Links.hs \
+ src/Html.hs \
+ src/Handlingar.hs \
+ src/Vimwiki/Man.hs \
+ src/System/Home.hs \
+ src/Util.hs \
+ src/Data/Text/Compat.hs
+
+DESTDIR =
+PREFIX = /usr
+
+GHC = ghc
+GHC_FLAGS = $(if $(DYNAMIC),-dynamic) -isrc -Wall -w -O2
+
+all: main
+
+main: src/main.hs $(HS_FILES)
+ $(GHC) -o $@ $(GHC_FLAGS) $<
+
+clean:
+ -rm $(HS_FILES:%.hs=%.hi)
+ -rm $(HS_FILES:%.hs=%.o)
+ -rm $(HS_FILES:%.hs=%.dyn_hi)
+ -rm $(HS_FILES:%.hs=%.dyn_o)
+ -rm main
+
+dist_dir = vimwiki-scripts-0.1
+
+dist: clean
+ mkdir $(dist_dir)
+ cp -r src $(dist_dir)
+ cp Makefile $(dist_dir)
+ cp style.css $(dist_dir)
+ cp script.js $(dist_dir)
+ tar caf vimwiki-scripts_0.1.orig.tar.gz $(dist_dir)
+ rm -r $(dist_dir)
+
+install:
+ install -D main $(DESTDIR)$(PREFIX)/bin/vimwiki-build
+ install -d $(DESTDIR)$(PREFIX)/share/vimwiki-scripts
+ install style.css $(DESTDIR)$(PREFIX)/share/vimwiki-scripts/style.css
+ install script.js $(DESTDIR)$(PREFIX)/share/vimwiki-scripts/script.js
diff --git a/hs/README.md b/hs/README.md
new file mode 100644
index 0000000..44af165
--- /dev/null
+++ b/hs/README.md
@@ -0,0 +1,17 @@
+Vimwiki Scripts
+===============
+
+Modes of Operation
+------------------
+
+### HTML
+
+### Handlingar
+
+Building
+--------
+The program can either be built by `cabal build`, or by the accompanying
+makefile. Cabal is generally recomended for development builds, while the
+makefile is recommended for packaging.
+
+`make dist` creates a tarball for Debian packages.