-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (27 loc) · 845 Bytes
/
Makefile
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
NVIM=nvim
PROJECT_NAME=duplicate
all: doc/tags
.PHONY:
doc/tags: doc/$(PROJECT_NAME).txt
@$(NVIM) --headless -c "helptags doc/" -c "exit"
# ts-vimdoc generate vimhelp from markdown
.SILENT:
.ONESHELL:
doc/$(PROJECT_NAME).txt: doc/index.md
$(NVIM) --headless -E -c "
lua require('ts-vimdoc').docgen({
input_file='doc/index.md',
output_file = '$@',
project_name='$(PROJECT_NAME)',
})
os.exit()
"
command -v unicode-emoji-remove.sh &> /dev/null || {
# Use 2> error.log to read the output of the command
echo -e "$0: $(tput setaf 1)error:$(tput op) unicode-emoji-remove.sh is nout found; install it from" \
"https://github.com/hinell/dotfiles/blob/main/bash-scripts/unicode-emoji-remove.sh" \
> /dev/stderr;
}
test -f $< && unicode-emoji-remove.sh -i $@
# strip <br> tags
sed -i -E -e 's/<\/?br\/?>\s*/\n/g' $@