-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
42 lines (30 loc) · 1.24 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
# This file is part of BaNaNaS2, an Add-on Content Management System for OpenTTD.
# Copyright (C) 2018, 2020 The OpenTTD team
#
# BaNaNaS2 is free software; you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation, version 2.
#
# BaNaNaS2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License for more details. You should have received a copy of the
# GNU General Public License along with BaNaNaS2. If not, see <http://www.gnu.org/licenses/>.
.PHONY: all docs html_docs
P3 = python3
PU = env -u DISPLAY plantuml
WGET = wget
all: html_docs lang_defs
.PHONY: all lang_defs
# The results of "docs" unfortunately result in modifies in the checkout, so do not do it by default
docs: docs/tables.png
docs/tables.pu: bananas2/data/*.py gen_docs.py
$(P3) gen_docs.py > $@
%.png: %.pu
$(PU) $^
FILES_MD = $(wildcard docs/*.md)
FILES_HTML = $(FILES_MD:%.md=%.html)
html_docs: $(FILES_HTML)
%.html: %.md
$(P3) -m markdown -x gfm $^ > $@
lang_defs:
$(WGET) -O bananas2/data/languages.csv http://translator.openttd.org/language-list