Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (45 loc) · 2.09 KB
/
Copy pathMakefile
File metadata and controls
50 lines (45 loc) · 2.09 KB
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
# DIRS: Directories we need to build. The results should be in a subdirectory of
# the same name. (e.g. setup/setup)
# FILES: Files we need to get from the base folder.
# HFILES: Hidden files we need to get from the base folder. These will be moved
# into the build folder preprended with a period.
DIRS:=setup generator lolcode vcalc gazprea info
FILES:=index.html $(patsubst base/%,%,$(wildcard base/css/*)) \
$(patsubst base/%,%,$(wildcard base/engineering/*)) \
$(patsubst base/%,%,$(wildcard base/static/*))
HFILES:=htaccess
# Created variables used in the build process, don't touch these.
HFILESDOT:=$(foreach file, $(HFILES), .$(file))
PDFS:=$(foreach file, $(DIRS), $(file).pdf)
.PHONY: all github clean
all:
# Gazprea publishes the glossary that all siblings pull from via
# intersphinx. Build it first so ``../gazprea/_build/html/objects.inv``
# exists when the sibling foreach runs. The subsequent per-dir
# ``make html`` on gazprea is an incremental no-op.
$(MAKE) html -C gazprea
$(foreach dir, $(DIRS), $(MAKE) html -C $(dir);)
$(foreach dir, $(DIRS), rm -rf $(dir)/_build/html/_static/css/fonts;)
$(foreach dir, $(DIRS), rm -rf $(dir)/_build/html/_static/fonts;)
$(foreach dir, $(DIRS), rm -rf $(dir)/_build/html/_sources/;)
$(foreach dir, $(DIRS), $(MAKE) latexpdf -C $(dir);)
$(MAKE) canvas -C gazprea
# Tangle the gazprea-example(-wrap) blocks into a .tar.gz of lit tests.
$(MAKE) examples -C gazprea
github: all
rm -rf _site
mkdir _site
mkdir _site/css
mkdir _site/static
mkdir _site/engineering
cp -r base/fuzzers _site/
$(foreach dir, $(DIRS), mkdir _site/$(dir);)
$(foreach dir, $(DIRS), cp -r $(dir)/_build/html/* _site/$(dir);)
$(foreach dir, $(DIRS), cp -r $(dir)/_build/latex/$(dir).pdf _site/$(dir).pdf;)
$(foreach file, $(FILES), cp base/$(file) _site/$(file);)
cp gazprea/_build/canvas/gazprea-glossary.html _site/gazprea/gazprea-glossary-canvas.html
cp gazprea/_build/examples/gazprea-examples.tar.gz _site/gazprea/gazprea-examples.tar.gz
touch _site/.nojekyll
clean:
$(foreach dir, $(DIRS), $(MAKE) -C $(dir) clean;)
rm -rf .build .build.tar.gz