# /usr/share/doc/maple-latex/examples/Makefile
#
# Ad hoc Makefile for building and playing with the exemple sources
# distributed within the debian package maple-latex.
#
# Recommended usage:
#  create a dedicated folder somewhere in your HOME directory;
#  link all the files in /usr/share/doc/maple-latex/examples in the
#  dedicated folder;
#  launch this Makefile in the dedicated folder:
#  $ make ;
#  for a basic cleanup, consider the clean target:
#  $ make clean ;
#  for an entire cleanup, the maintainer-clean target:
#  $ make maintainer-clean ;
#  for other targets, just read the Makefile.
#
# written for Debian by Jerome Benoit <calculus@rezozer.net>
# on behalf of the Debian Tex Maintainers <debian-tex-maint@lists.debian.org>
# copyright: 2025 Jerome Benoit <calculus@rezozer.net>
# distributed within the public domain.
#

DOCUMENTS = $(patsubst %.tex,%.pdf,$(wildcard *.tex))
EPSFIGURES = $(wildcard *.eps)

CONVERTEDTOPDFFIGURES = $(patsubst %.eps,%-eps-converted-to.pdf,$(EPSFIGURES))

TEXOPTS = #-interaction batchmode

default: all

all: compose

compose: $(DOCUMENTS)

check: compose

auxclean:
	$(RM) *.aux *.out *.log

clean: auxclean
	$(RM) $(CONVERTEDTOPDFFIGURES)

distclean: clean
	$(RM) $(DOCUMENTS)

maintainer-clean: distclean

%.pdf : %.tex
	$(PDFLATEX) $(TEXOPTS) $<
	$(PDFLATEX) $(TEXOPTS) $<
	$(PDFLATEX) $(TEXOPTS) $<

PDFLATEX ?= pdflatex
