mirror of
https://github.com/alex-s168/website.git
synced 2025-09-10 01:05:07 +02:00
c
This commit is contained in:
11
config.py
11
config.py
@@ -1,10 +1,19 @@
|
||||
import os
|
||||
|
||||
gen = """
|
||||
build always: phony
|
||||
|
||||
rule regen
|
||||
command = python config.py
|
||||
generator = 1
|
||||
|
||||
rule update_git_rev
|
||||
command = git rev-parse HEAD > build/git_rev.txt.tmp && \
|
||||
cmp -s build/git_rev.txt.tmp build/git_rev.txt || mv build/git_rev.txt.tmp build/git_rev.txt; \
|
||||
rm -f build/git_rev.txt.tmp
|
||||
restat = 1
|
||||
build build/git_rev.txt: update_git_rev | always
|
||||
|
||||
rule typst
|
||||
depfile = $out.d
|
||||
command = eval "typst compile --root . --features html -j 6 $flags $in $out --make-deps $out.d"
|
||||
@@ -73,7 +82,7 @@ web_targets = []
|
||||
for page in pages:
|
||||
gr = "build/" + page + ".git_rev.txt"
|
||||
gen += "\n"
|
||||
gen += "build "+gr+" : git_inp pages/" + page
|
||||
gen += "build "+gr+" : git_inp pages/" + page + " | build/git_rev.txt"
|
||||
for var in variants:
|
||||
tg = "build/" + page + var["suffix"]
|
||||
web_targets.append(tg)
|
||||
|
Reference in New Issue
Block a user