-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 870 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# Makefile
# ajdiaz, 2016-02-07 09:19
#
SRCDIR=src
DOCDIR=man
OUTBIN=./tl
DOCSRC=$(wildcard $(DOCDIR)/*.md)
DOCOBJ=$(DOCSRC:%.md=%)
all: tl doc sign
sign: tl
gpg --batch --yes -o tl.asc --detach-sign --armor tl
tl: $(SRCDIR)/*
@echo "#! /bin/bash -i" > $(OUTBIN)
@echo "TIMELINE_VERSION='$(shell git describe --tags)'" >> $(OUTBIN)
find $(SRCDIR) -type f -exec cat {} \; >> $(OUTBIN)
@echo 'main "$$@"' >> $(OUTBIN)
@chmod 755 $(OUTBIN)
@ls -l $(OUTBIN)
doc: $(DOCOBJ)
$(DOCOBJ): $(DOCSRC)
export VERSION='$(shell git describe --tags)'; name="$@.md"; f="$@.md"; \
name="$${name##*/}"; name="$${name%.md}"; mansect="$${name##*.}" name="$${name%.*}"; \
pandoc -s -t man -o "$@" -M "title:$${name^^}($$mansect) Timeline v$${VERSION} | Timeline Manual" -M "date:$$(date +'%Y-%m-%d')" "$$f"
clean:
rm -f $(OUTBIN)
rm -f $(DOCDIR)/*.{1..9}
# vim:ft=make