-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
101 lines (75 loc) · 2.58 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
MAKE ?= make
AWK ?= awk
UNAME := $(shell uname)
MAXDEPTH := '-d'
ifeq ($(UNAME), Linux)
MAXDEPTH := '-maxdepth'
endif
MKDIR := mkdocs
DOCDIR := $(MKDIR)/docs
NEWSDIR := $(MKDIR)/src/news
NEWSARCH := $(NEWSDIR)/archive
DSTCOMM := $(MKDIR)/docs/community
DSTARCH := $(DSTCOMM)/archive
NEWS := $(shell find $(NEWSDIR) $(MAXDEPTH) 1 -name "*.md" | sort -r)
ARCHNEWS := $(shell find $(NEWSARCH) $(MAXDEPTH) 1 -name "*.md" | sort -r)
.PHONY: build
####################################################################
help:
@echo "========================================================"
@echo " Faust Web Site"
@echo "This Makefile is intended to generate the faust web site"
@echo "========================================================"
@echo "Available targets are:"
@echo " install : install the required components"
@echo " build : build the web site"
@echo " serve : launch the mkdoc server"
@echo "Development specific targets are available:"
@echo " all : generates all the necessary files from the src folder"
@echo " news : build the news md file"
@echo " clean : remove generated files (news.md)"
@echo "Making the current version publicly available:"
@echo " publish : make all + build and make sure that CNAME is preserved"
test:
@echo NEWS: $(NEWS)
####################################################################
build:
$(MAKE) all
cd $(MKDIR) && mkdocs build
git checkout docs/CNAME
git checkout docs/syfala
serve:
@echo "you can browse the site at http://localhost:8000"
cd $(MKDIR) && mkdocs serve
all:
$(MAKE) news
clean:
rm -f $(DSTCOMM)/news.md $(DSTARCH)/news.md
publish:
$(MAKE) build
git checkout docs/CNAME
@echo "Review the changes, add new files, commit and push manually"
####################################################################
# building news
news : $(DSTCOMM) $(DSTCOMM)/news.md # $(DSTARCH)/news.md
$(DSTCOMM)/news.md : $(NEWS)
cat $(NEWS) > $@
echo >> $@
$(DSTCOMM)/archive/news.md : $(DSTARCH)
cat $(ARCHNEWS) > $@
$(DSTCOMM):
mkdir -p $(DSTCOMM)
$(DSTARCH):
mkdir -p $(DSTARCH)
####################################################################
install:
pip install mkdocs==1.5.3
pip install mkdocs-pdf-export-plugin
pip install markdown-include
pip install mkdocs-bootswatch
pip install mkdocs-redirects
uninstall:
pip uninstall -y mkdocs-material
pip uninstall -y pymdown-extensions
pip uninstall -y markdown-blockdiag
pip uninstall -y mkdocs-pdf-export-plugin