Mentions légales du service

Skip to content
Snippets Groups Projects
Makefile 579 B
Newer Older
# Depends: rubber
ORGS = $(wildcard *.org)
TEXS = $(patsubst %.org,%.tex,$(ORGS))
PDFS = $(patsubst %.org,%.pdf,$(ORGS))
MAIN = swentry

all: $(MAIN).pdf

.PRECIOUS: $(TEXS)

%.tex: %.org
	pandoc -s $< -f org -t latex --toc -o $@

%.pdf: %.tex
ifeq (, $(shell PATH=$(PATH) which rubber))
	echo "No rubber in $(PATH), falling back to basic pdflatex calls"
	pdflatex $<
	biber $*
	pdflatex $<
else
	rubber -m pdftex $<
endif

clean: $(patsubst %,%/clean,$(TEXS))
	rubber --clean sample.tex

%/clean:
	if [ -f $* ]; then rubber -m pdftex --clean $* ; fi
	rm -f $*

distclean: clean