summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mugsthesis/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/mugsthesis/Makefile')
-rw-r--r--macros/latex/contrib/mugsthesis/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/macros/latex/contrib/mugsthesis/Makefile b/macros/latex/contrib/mugsthesis/Makefile
new file mode 100644
index 0000000000..e951a834e1
--- /dev/null
+++ b/macros/latex/contrib/mugsthesis/Makefile
@@ -0,0 +1,41 @@
+PACKAGE=mugsthesis
+
+PDF = $(PACKAGE).pdf
+
+all: ${PDF} SAMPLE
+
+%.pdf: %.dtx $(PACKAGE).cls
+ pdflatex $<
+ - makeindex -s gind.ist -o $*.ind $*.idx
+ - makeindex -s gglo.ist -o $*.gls $*.glo
+ pdflatex $<
+ while ( grep -1 '^LaTeX Warning: Label(s) may have changed' $*.log) do pdflatex $<; done
+
+%.cls: %.ins %.dtx
+ latex $<
+
+SAMPLE: sample/$(PACKAGE)_sample.tex sample/$(PACKAGE).cls
+ latexmk -pdf -cd $<
+
+sample/%: %
+ cp $^ sample
+
+sample/$(PACKAGE).cls: $(PACKAGE).cls
+
+.PRECIOUS: $(PACKAGE).cls
+
+docclean:
+ $(RM) *.log *.aux *.glo *.gls *.hd *.idx *.ilg *.ind *.out *.toc *.lof *.lot \
+ sample/*.log sample/*.aux sample/*.out sample/*.bbl sample/*.blg sample/*.fls \
+ sample/*.lof sample/*.lot sample/*.toc sample/*.fdb_latexmk sample/$(PACKAGE).cls
+
+clean: docclean
+ $(RM) $(PACKAGE).cls
+
+distclean: clean
+ $(RM) *.pdf sample/*.pdf
+
+ctan: all clean
+ COPYFILE_DISABLE=1 tar -C .. -czvf ../$(PACKAGE).tgz --exclude '.git*' --exclude '*.tgz' $(PACKAGE); mv ../$(PACKAGE).tgz .
+
+.PHONY: all SAMPLE docclean clean distclean ctan