diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-31 00:02:37 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-10-31 00:02:37 +0100 |
commit | 75e61b2f633bacd66b15be33eba90a2de0cee76e (patch) | |
tree | a4d846e02d8da1000e145b784d40719d74ae0542 | |
parent | Crash with error message when data files are missing. (diff) | |
download | vimwiki-scripts-0.1.tar.gz vimwiki-scripts-0.1.tar.xz |
Add makefile.v0.1
-rw-r--r-- | hs/Makefile | 47 | ||||
-rw-r--r-- | hs/README.md | 17 |
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. |