Skip to content

Commit

Permalink
chore(tooling): Facilitate selfcheck and manual builds without develo…
Browse files Browse the repository at this point in the history
…per mode biraries
  • Loading branch information
alerque committed Sep 27, 2023
1 parent 9d8635e commit 17d1691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ CARGO_FEATURE_ARGS = --features $(MLUAVER)

DEPDIR := .deps
LOCALFONTS := FONTCONFIG_FILE=$(PWD)/fontconfig.conf
LOCALPATHS := SILE_PATH="$(PWD);libtexpdf/.libs;justenough/.libs"
SILEFLAGS ?= -m $(DEPDIR)/$(basename $@).d -d versions -f fontconfig

dist-hook: $(MANUAL) dist-hook-distfiles
Expand All @@ -114,8 +115,7 @@ check: selfcheck
selfcheck: | $(bin_PROGRAMS) $(_BUILT_SUBDIRS)
output=$$(mktemp -t selfcheck-XXXXXX.pdf)
trap 'rm -f $$output' EXIT HUP TERM
export SILE_PATH
echo "<sile>foo</sile>" | SILE_PATH=$(PWD) ./$(bin_PROGRAMS) -o $$output -
echo "<sile>foo</sile>" | $(LOCALPATHS) ./$(bin_PROGRAMS) -o $$output -
$(PDFINFO) $$output | $(GREP) "SILE v$(VERSION)"

.PHONY: docs
Expand All @@ -125,7 +125,7 @@ docs: $(MANUAL)
# garantee the TOC is up to date, simplify when #230 is fixed.
hastoc = [ -f $(subst .pdf,.toc,$@) ] && echo true || echo false
pages = $(PDFINFO) $@ | $(AWK) '$$1 == "Pages:" {print $$2}' || echo 0
localsile = $(LOCALFONTS) SILE_PATH=$(PWD) ./$(bin_PROGRAMS) $(SILEFLAGS)
localsile = $(LOCALFONTS) $(LOCALPATHS) ./$(bin_PROGRAMS) $(SILEFLAGS)
silepass = $(localsile) $< -o $@ && pg0=$${pg} pg=$$($(pages)) || false
define runsile =
set -e
Expand Down

0 comments on commit 17d1691

Please sign in to comment.