Skip to content

Instantly share code, notes, and snippets.

@tueda
Created December 16, 2023 07:20
Show Gist options
  • Save tueda/1cf998be1951950f206acb7823250b6d to your computer and use it in GitHub Desktop.
Save tueda/1cf998be1951950f206acb7823250b6d to your computer and use it in GitHub Desktop.
Makefile for pLaTeX with relaxed filename restrictions
SOURCES := $(wildcard *.tex)
DOCUMENTS := $(SOURCES:.tex=.pdf)
CLEANFILES := \
$(foreach doc,$(DOCUMENTS),"$(doc)") \
$(foreach doc,$(SOURCES:.tex=.aux),"$(doc)") \
$(foreach doc,$(SOURCES:.tex=.log),"$(doc)")
all: $(DOCUMENTS)
clean:
rm -f -v $(CLEANFILES)
.SUFFIXES: .tex .pdf
.tex.pdf:
ptex2pdf -l "$<"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment