resume/Makefile

48 lines
989 B
Makefile
Raw Normal View History

2023-07-31 04:30:43 +03:00
color = F44336
photo = false
extra = false
build = $(CURDIR)/build
src = $(CURDIR)/tex
target = $(src)/Main.tex
output = $(build)/Main.pdf
outputen = $(build)/VoronindEn.pdf
outputru = $(build)/VoronindRu.pdf
export RESUME_COLOR := $(color)
export RESUME_PHOTO := $(photo)
export RESUME_EXTRA := $(extra)
.PHONY: all
all: clean icon en ru open
.PHONY: clean
clean:
@rm -rf $(build)
.PHONY: icon
icon:
@mkdir -p $(build)/image;\
cd image/icon;\
for file in *; do convert "$$file" -fill "#$$RESUME_COLOR" -colorize 100 $(build)/image/"$$file" &> /dev/null || cp "$$file" $(build)/image/; done
.PHONY: en
en: icon
@mkdir -p $(build);\
cd $(src);\
export RESUME_LANG=en;\
lualatex --output-dir=$(build) $(target);\
mv $(output) $(outputen)
.PHONY: ru
ru: icon
@mkdir -p $(build);\
cd $(src);\
export RESUME_LANG=ru;\
lualatex --output-dir=$(build) $(target);\
mv $(output) $(outputru)
.PHONY: open
open:
@xdg-open $(outputen);\
xdg-open $(outputru)