-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
156 lines (124 loc) · 5.24 KB
/
Copy pathMakefile
File metadata and controls
156 lines (124 loc) · 5.24 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
.PHONY: all stages-0-6 stage0 stage1 stage2 stage3 stage4 stage5 stage6 stage7 stage8 stage9 stage10 stage11 stage12 stage13 stage14 stage15 stage16 stage17 stage18 stage19 clean docker-build docker-run ouroboros docker-ouroboros test-suite docker-test-suite example docker-example
IMAGE_NAME ?= ouroboros-html:latest
CYCLES ?= 3
example:
@echo "=========================================================="
@echo " [OUROBOROS-HTML] COMPILING EXAMPLE APP (example/index.html)"
@echo "=========================================================="
mkdir -p example/dist
cp example/index.html stages/00_input/input.html
$(MAKE) clean
$(MAKE) all
cp stages/19_assertion/output.html example/dist/index.html
cp fixtures/01_canonical.html stages/00_input/input.html
@echo ""
@echo "=========================================================="
@echo " [OUROBOROS-HTML] EXAMPLE COMPILED -> example/dist/index.html"
@echo " Payload: $$(cat example/dist/index.html)"
@echo "=========================================================="
docker-example:
docker run --rm -v "$$(pwd):/workspace" -w /workspace $(IMAGE_NAME) make example
all: stage0 stage1 stage2 stage3 stage4 stage5 stage6 stage7 stage8 stage9 stage10 stage11 stage12 stage13 stage14 stage15 stage16 stage17 stage18 stage19
@echo "=========================================================="
@echo " ALL STAGES (0-19) EXECUTED"
@echo "=========================================================="
test-suite:
python3 scripts/test_suite.py
docker-test-suite:
docker run --rm -v "$$(pwd):/workspace" -w /workspace $(IMAGE_NAME) make test-suite
ouroboros:
python3 scripts/ouroboros_cycle.py --cycles $(CYCLES)
docker-ouroboros:
docker run --rm -v "$$(pwd):/workspace" -w /workspace $(IMAGE_NAME) make ouroboros CYCLES=$(CYCLES)
stages-0-6: stage0 stage1 stage2 stage3 stage4 stage5 stage6
@echo ""
@echo "=========================================================="
@echo " [OUROBOROS-HTML] STAGES 0-6 PIPELINE VERIFIED!"
@echo " Input: $$(cat stages/00_input/input.html)"
@echo " Output: $$(cat stages/06_rust_wasmtime/output.txt)"
@echo "=========================================================="
stage0:
@echo "\n===> [Stage 0] Input HTML5"
$(MAKE) -C stages/00_input
stage1: stage0
@echo "\n===> [Stage 1] Python (Jinja2) template AST parsing & evaluation"
$(MAKE) -C stages/01_python_jinja2
stage2: stage1
@echo "\n===> [Stage 2] PHP 8.3 CLI Hypertext Preprocessor execution"
$(MAKE) -C stages/02_php_preprocessor
stage3: stage2
@echo "\n===> [Stage 3] Go (templ) component generation"
$(MAKE) -C stages/03_go_templ
stage4: stage3
@echo "\n===> [Stage 4] Go c-archive exported C headers & bridge"
$(MAKE) -C stages/04_go_carchive
stage5: stage4
@echo "\n===> [Stage 5] C wrapper compiled to WebAssembly via Emscripten (emcc)"
$(MAKE) -C stages/05_emcc_wasm
stage6: stage5
@echo "\n===> [Stage 6] Rust binary ingesting Wasm bytecode via wasmtime"
$(MAKE) -C stages/06_rust_wasmtime
stage7: stage6
@echo "\n===> [Stage 7] Brainfuck generator"
$(MAKE) -C stages/07_brainfuck_gen
stage8: stage7
@echo "\n===> [Stage 8] Brainfuck runtime"
$(MAKE) -C stages/08_brainfuck_runtime
stage9: stage8
@echo "\n===> [Stage 9] Babel AST pipeline"
$(MAKE) -C stages/09_babel_ast
stage10: stage9
@echo "\n===> [Stage 10] Svelte component AST compiler & SSR execution"
$(MAKE) -C stages/10_svelte_ast
stage11: stage10
@echo "\n===> [Stage 11] JSX to XML compiler"
$(MAKE) -C stages/11_jsx_to_xml
stage12: stage11
@echo "\n===> [Stage 12] PostgreSQL PL/pgSQL XML recursive query"
$(MAKE) -C stages/12_postgres_plpgsql
stage13: stage12
@echo "\n===> [Stage 13] Pandoc LaTeX to Org-Mode to DocBook XML"
$(MAKE) -C stages/13_pandoc_docbook
stage14: stage13
@echo "\n===> [Stage 14] XSLT DocBook to Pug (Jade)"
$(MAKE) -C stages/14_xslt_pug
stage15: stage14
@echo "\n===> [Stage 15] Handlebars template AST compilation & execution"
$(MAKE) -C stages/15_handlebars
stage16: stage15
@echo "\n===> [Stage 16] HTMX headless DOM harness"
$(MAKE) -C stages/16_htmx_dom
stage17: stage16
@echo "\n===> [Stage 17] DOM serialization to XHTML 1.0 Strict"
$(MAKE) -C stages/17_dom_xhtml
stage18: stage17
@echo "\n===> [Stage 18] PostHTML / HTML minifier"
$(MAKE) -C stages/18_posthtml_minify
stage19: stage18
@echo "\n===> [Stage 19] Automated DOM assertion step"
$(MAKE) -C stages/19_assertion
docker-build:
docker build -t $(IMAGE_NAME) -f Dockerfile .
docker-run:
docker run --rm -v "$$(pwd):/workspace" -w /workspace $(IMAGE_NAME) make all
clean:
$(MAKE) -C stages/00_input clean
$(MAKE) -C stages/01_python_jinja2 clean
$(MAKE) -C stages/02_php_preprocessor clean
$(MAKE) -C stages/03_go_templ clean
$(MAKE) -C stages/04_go_carchive clean
$(MAKE) -C stages/05_emcc_wasm clean
$(MAKE) -C stages/06_rust_wasmtime clean
$(MAKE) -C stages/07_brainfuck_gen clean
$(MAKE) -C stages/08_brainfuck_runtime clean
$(MAKE) -C stages/09_babel_ast clean
$(MAKE) -C stages/10_svelte_ast clean
$(MAKE) -C stages/11_jsx_to_xml clean
$(MAKE) -C stages/12_postgres_plpgsql clean
$(MAKE) -C stages/13_pandoc_docbook clean
$(MAKE) -C stages/14_xslt_pug clean
$(MAKE) -C stages/15_handlebars clean
$(MAKE) -C stages/16_htmx_dom clean
$(MAKE) -C stages/17_dom_xhtml clean
$(MAKE) -C stages/18_posthtml_minify clean
$(MAKE) -C stages/19_assertion clean