-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (42 loc) · 1.38 KB
/
Copy pathMakefile
File metadata and controls
62 lines (42 loc) · 1.38 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
.PHONY: build script site clean test test-hooks test-all
SRC := src/header.sh \
src/constants.sh \
src/utils.sh \
src/commands.sh \
src/main.sh \
src/footer.sh
OUT ?= .githook.sh
build: script site
script: $(OUT)
$(OUT): $(SRC)
@cat $(SRC) > $(OUT)
@chmod +x $(OUT)
SITE_BASE := site/src/_base.m4
SITE_STATIC := site/src/style.css site/src/copy.js site/src/llms.txt site/src/favicon.png site/src/robots.txt site/src/sitemap.xml
site: site/dist/index.html site/dist/docs/index.html site/dist/style.css site/dist/copy.js site/dist/llms.txt site/dist/favicon.png site/dist/robots.txt site/dist/sitemap.xml
site/dist/index.html: site/src/index.m4 $(SITE_BASE) | site/dist
@cd site/src && m4 index.m4 > ../dist/index.html
site/dist/docs/index.html: site/src/docs/index.m4 $(SITE_BASE) | site/dist/docs
@cd site/src && m4 docs/index.m4 > ../dist/docs/index.html
site/dist/%.css: site/src/%.css | site/dist
@cp $< $@
site/dist/%.js: site/src/%.js | site/dist
@cp $< $@
site/dist/%.txt: site/src/%.txt | site/dist
@cp $< $@
site/dist/%.png: site/src/%.png | site/dist
@cp $< $@
site/dist/%.xml: site/src/%.xml | site/dist
@cp $< $@
site/dist:
@mkdir -p site/dist
site/dist/docs: | site/dist
@mkdir -p site/dist/docs
clean:
rm -f $(OUT)
rm -rf site/dist
test: build
@sh test/run.sh
test-hooks: build
@sh test/hooks/run.sh
test-all: test test-hooks