Skip to content

Commit aa8a557

Browse files
committed
Configure build rules for Quarkdown
1 parent 048fd11 commit aa8a557

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ MAGICK ?= magick
2020
NPM ?= npm
2121
NPX ?= npx
2222
PAGEDJS ?= $(NPX) pagedjs-cli
23+
QUARKDOWN ?= quarkdown
2324
SATYSFI ?= satysfi
2425
SED ?= sed
2526
SILE ?= sile
@@ -34,8 +35,12 @@ ZOLA ?= zola
3435
BASE_URL = /
3536

3637
GROFF_ARGS = -T pdf $< > $@
38+
39+
QUARKDOWN_ARGS = c --pdf --out . $<
40+
3741
PAGEDJS_ARGS = -i $< -o $@
3842

43+
QUARKDOWN_ARGS = c --pdf --out $(@D) $<
3944
SATYSFI_ARGS = $< -o $@
4045

4146
SILE_ARGS = -o $@ $<
@@ -66,7 +71,7 @@ define make_manifest ?=
6671
demosrc = "$(notdir $(basename $@)$(suffix $<))"
6772
demoout = "$(notdir $@)"
6873
preview = "$(notdir $(basename $@)).avif"
69-
cmd = "$(subst $(NPX) ,,$(subst $<,$(notdir $(basename $@)$(suffix $<)),$(subst $@,$(notdir $@),$1)))"
74+
cmd = "$(subst --out $(@D),,$(subst $(NPX) ,,$(subst $<,$(notdir $(basename $@)$(suffix $<)),$(subst $@,$(notdir $@),$1))))"
7075
EOF
7176
exec $1
7277
endef
@@ -121,6 +126,10 @@ fonts: .fonts/EgyptianOpenType.ttf
121126
local args="$(call get_typesetter_args,content/$(notdir $(basename $*)).md,$(notdir $(basename $<)))"
122127
$(call make_manifest,$(PAGEDJS) $(TYPESETTER_ARGS) $(PAGEDJS_ARGS))
123128

129+
%-quarkdown.pdf %-quarkdown.toml: %/quarkdown.qd
130+
local args="$(call get_typesetter_args,content/$(notdir $(basename $@)).md,$(notdir $(basename $<)))"
131+
$(call make_manifest,$(QUARKDOWN) $(TYPESETTER_ARGS) $(QUARKDOWN_ARGS))
132+
124133
%-satysfi.pdf %-saty.toml: %/satysfi.saty
125134
$(call make_manifest,$(SATYSFI) $(SATYSFI_ARGS))
126135

0 commit comments

Comments
 (0)