added example workflow...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-07-31 15:39:33 +03:00
parent 3ff7a4f595
commit 3bb9fb87a2
7 changed files with 115 additions and 0 deletions

115
workflow/Makefile Normal file
View File

@ -0,0 +1,115 @@
#----------------------------------------------------------------------
#
#
#
#----------------------------------------------------------------------
# make config...
.SECONDEXPANSION:
.DEFAULT_GOAL := all
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# config...
DIST_DIR := dist/PRINT
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# sources...
SETUP := \
setup.tex \
macros.tex
#----------------------------------------------------------------------
# config/commands...
MD = @mkdir -p
# primary engine, everything works...
# NOTE: several hacks had to be made -- see setup.tex
CMD = lualatex
ARGS = -output-driver="xdvipdfmx -q -E -V 3"
#----------------------------------------------------------------------
# components and rules...
# book blocks...
#
# generic latex -> pdf...
#
%.pdf: %.tex $(SETUP)
-$(CMD) $<
#----------------------------------------------------------------------
# production targets...
.PHONY: test
test: test.pdf
.PHONY: all
all: main.pdf cover.pdf endpaper.pdf
#----------------------------------------------------------------------
# packageing...
.PHONY: dist-%
dist-%: %
$(MD) $(DIST_DIR)/$<
cp *$<*.pdf components/*$<*.pdf $(DIST_DIR)/$</
.PHONY: dist-cover
dist-cover: $(wildcard components/*main*.pdf) components/endpaper.png
$(MD) $(DIST_DIR)/cover
cp $? $(DIST_DIR)/cover/
.PHONY: dist
dist: dist-main
#----------------------------------------------------------------------
# utility trgets...
.PHONY: sweep
sweep:
-rm *.out *.aux *.log *.upa ; true
.PHONY: clean-dist
clean-dist:
-rm -rf ./dist
.PHONY: clean
clean: sweep
-rm -rf *.pdf PRINT ; true
.PHONY: clean-all
clean-all: clean clean-dist
#----------------------------------------------------------------------
#

0
workflow/cover.tex Normal file
View File

0
workflow/endpaper.tex Normal file
View File

0
workflow/macros.tex Normal file
View File

0
workflow/main.tex Normal file
View File

0
workflow/setup.tex Normal file
View File

0
workflow/test.tex Normal file
View File