doc: Replace README.md by README.org

This commit is contained in:
Alexander Kobjolke 2023-01-06 14:20:31 +01:00
parent f55a6c71b6
commit 737ff6afe3
3 changed files with 78 additions and 94 deletions

View file

@ -1,22 +1,27 @@
.PHONY: default all install watch clean build release distclean lint
.PHONY: default all install watch clean build release distclean lint doc
default: all
all: build
build: builddir build/bin/annotator
GHCFLAGS = -iapp -isrc -Wall -O2 -outputdir build/.obj
BUILDDIR = build
DESTDIR = ~/.local
BINDIR = ${DESTDIR}/bin
DOCDIR = ${DESTDIR}/share/doc/annotator
build: builddir | $(BUILDDIR)/bin/annotator doc
builddir:
mkdir -p $(BUILDDIR)/bin $(BUILDDIR)/.obj $(BUILDDIR)/ci $(BUILDDIR)/dist
mkdir -p $(BUILDDIR)/{bin,.obj,ci,dist,doc}
doc: builddir | $(BUILDDIR)/doc/README.md
$(BUILDDIR)/bin/annotator: app/Main.hs src/*.hs
ghc --make $(GHCFLAGS) $< -o $@
$(BUILDDIR)/doc/README.md: README.org
pandoc -t gfm $< -o $@
watch:
@git ls-files src app Makefile | entr make -s build install
@ -31,9 +36,10 @@ clean:
distclean: clean
@rm -rf dist
install: $(BUILDDIR)/bin/annotator
@install -m 0755 -D -t ${BINDIR} $<
@install -m 0644 -D -t ${DOCDIR} README.md
install: build
@install -m 0755 -D -t ${BINDIR} $(BUILDDIR)/bin/annotator
@install -m 0644 -D -t ${DOCDIR} README.org
@install -m 0644 -D -t ${DOCDIR} $(BUILDDIR)/doc/README.md
release: script/make-release
@$<