-
Notifications
You must be signed in to change notification settings - Fork 24
/
tools.mak
37 lines (30 loc) · 1.05 KB
/
tools.mak
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
37
ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
download = curl -f -L -- "$(1)" > "[email protected]" && touch [email protected] && mv [email protected] $@
else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
download = rm -f [email protected] && \
wget --passive -c -p -O [email protected] "$(1)" && \
touch [email protected] && \
mv [email protected] $@
else ifeq ($(which fetch >/dev/null 2>&1 || echo FAIL),)
download = rm -f [email protected] && \
fetch -p -o [email protected] "$(1)" && \
touch [email protected] && \
mv [email protected] $@
else
download = $(error Neither curl nor wget found!)
endif
# mmark
mmark_$(MMARK_VERSION)_$(MMARK_OS)_$(MMARK_MACHINE).tgz:
$(call download,https://github.com/mmarkdown/mmark/releases/download/v$(MMARK_VERSION)/mmark_$(MMARK_VERSION)_$(MMARK_OS)_$(MMARK_MACHINE).tgz)
mmark: mmark_$(MMARK_VERSION)_$(MMARK_OS)_$(MMARK_MACHINE).tgz
tar xvzf $^
touch $@
.buildmmark: mmark
.uninstall_mmark:
$(RM) mmark
# xml2rfc
.buildxml2rfc:
pip3 install --user "xml2rfc~=$(XML2RFC_VERSION)"
.uninstall_xml2rfc:
pip3 uninstall -y xml2rfc
clean: .uninstall_mmark .uninstall_xml2rfc