File: Makefile

package info (click to toggle)
faust 2.79.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 397,496 kB
  • sloc: cpp: 278,433; ansic: 116,164; javascript: 18,529; vhdl: 14,052; sh: 13,884; java: 5,900; objc: 3,852; python: 3,222; makefile: 2,655; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 110; tcl: 26
file content (92 lines) | stat: -rw-r--r-- 2,927 bytes parent folder | download
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

MAKE 	?= make
AWK		?= gawk

DOCDIR   := docs
SITEDIR	 := ../docs
FAUSTLIBS ?= ../../faustlibraries

SRC   	 := $(shell cat $(FAUSTLIBS)/all.lib | grep import | sed -e 's/[^"]*"\(..*\.lib\).*/\1/')
MD   	 := $(SRC:%.lib=$(DOCDIR)/libs/%.md)
LIST   	 := $(SRC:%.lib=%)

####################################################################
help:
	@echo "========================================================================"
	@echo "                     Faust Libraries Documentation"
	@echo "This Makefile is intended to generate the faust libraries documentation"
	@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 "  md       : build the md files"
	@echo "  pdf      : build the PDF documentation"
	@echo "  index    : build the index file"
	@echo "  clean    : removes the output of the md target"
	@echo "  list     : list libraries (ready to be included in mkdocs.yml menu)"

test: 
	@echo MD: $(MD)

####################################################################
build:
	$(MAKE) md
	$(MAKE) index
	mkdocs build
	git checkout $(SITEDIR)/CNAME

serve:
	@echo "you can browse the site at http://localhost:8000"
	mkdocs serve

list:
	@echo $(foreach e, $(LIST), "        - '" $e "':  libs/"$e.md"\n")
	
pdf:
	pandoc --pdf-engine=xelatex --toc docs/index.md docs/organization.md docs/standardFunctions.md docs/contributing.md docs/about.md docs/libs/*.md -o library.pdf

clean:
	rm -f $(MD)
	

####################################################################
# building md files
md : $(DOCDIR)/libs $(MD)

$(DOCDIR)/libs :
	mkdir $(DOCDIR)/libs 

$(DOCDIR)/libs/%.md:$(FAUSTLIBS)/%.lib 
	@echo ========= building $<
	cat $< | $(AWK) -f scripts/faustlib2md.awk > $@

####################################################################
# building index
index: $(DOCDIR)/libs/index.md
$(DOCDIR)/libs/index.md : $(MD)
	$(AWK) -f scripts/makeindex.awk $(MD) > $@
	

####################################################################
$(FAUSTDIR):
	@echo "FAUSTLIBS not found ! ($(FAUSTLIBS))"
	@echo "you should either:"
	@echo "   - set FAUSTLIBS to the faust projet location in this Makefile"
	@echo "   - call $(MAKE) FAUSTLIBS=faust_projet_path"
	@false;

####################################################################
install:
	pip install mkdocs==1.5.3
	pip install mkdocs-pdf-export-plugin
	pip install markdown-include
	pip install mkdocs-bootswatch
	pip install python-markdown-math

uninstall:
	pip uninstall -y mkdocs-material
	pip uninstall -y pymdown-extensions
	pip uninstall -y markdown-blockdiag
	pip uninstall -y mkdocs-pdf-export-plugin