
SOURCES := $(wildcard *.tex)
TARGETS := $(SOURCES:%.tex=%)

# https://stackoverflow.com/a/61481993
D1 = $(notdir $(abspath $(CURDIR)))
D2 = $(notdir $(abspath $(CURDIR)/..))

all: $(TARGETS)

%: %.tex
	lualatex --jobname=$(D2)-$(D1)-$@ $<

clean:
	rm -f *.aux *.log
