summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mdframed/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/mdframed/Makefile')
-rw-r--r--Master/texmf-dist/doc/latex/mdframed/Makefile168
1 files changed, 109 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/latex/mdframed/Makefile b/Master/texmf-dist/doc/latex/mdframed/Makefile
index 97d8d486c0f..661e153e91a 100644
--- a/Master/texmf-dist/doc/latex/mdframed/Makefile
+++ b/Master/texmf-dist/doc/latex/mdframed/Makefile
@@ -1,54 +1,127 @@
-# Makefile for mdframed project folder
-# $Id: Makefile 271 2011-12-09 12:25:08Z marco $
+################################################################
+## Makefile for mdframed project folder
+## $Id: Makefile 313 2012-01-08 12:51:10Z marco $
+################################################################
+## Definitions
+################################################################
+.SILENT:
SHELL := /bin/bash
+.PHONY: all clean
+################################################################
+## Name list
+################################################################
PACKAGE = mdframed
-EXAMPLEA = mdframed-examples
EXAMPLED = mdframed-example-default
EXAMPLET = mdframed-example-tikz
EXAMPLEP = mdframed-example-pstricks
EXAMPLESX = mdframed-example-texsx
-EXAMPLLIST = $(EXAMPLEA) $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX)
-PDFLATEX = pdflatex
-LATEX = latex
-DVIPS = dvips
-PSPDF = ps2pdf
-MAKEIDX = makeindex
-
+EXAMPLLIST= $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX)
+FILELIST = $(PACKAGE) $(EXAMPLED) $(EXAMPLET) $(EXAMPLEP) $(EXAMPLESX)
+AUXFILES = aux dtxe glo glolog gls hd ins idx idxlog ilg ind log out ps thm tmp toc
+################################################################
+## Colordefinition
+################################################################
NO_COLOR = \x1b[0m
OK_COLOR = \x1b[32;01m
WARN_COLOR = \x1b[33;01m
ERROR_COLOR = \x1b[31;01m
+################################################################
+## make help
+################################################################
+help:
+ @echo
+ @echo -e "$(WARN_COLOR)The following definitions provided by this Makefile"
+ @echo -e "$(OK_COLOR)\tmake docsty\t\t--\ttypesets the documenation and the package"
+ @echo -e "$(OK_COLOR)\tmake all\t\t--\trun docsty examples clean"
+ @echo -e "\tmake examples\t\t--\tcompiles all example files"
+ @echo -e "\tmake clean\t\t--\tremove all helpfiles created by mdframed"
+ @echo -e "\tmake changeversion\t--\tmaintaner tool to change the version"
+ @echo -e "$(WARN_COLOR)End help$(NO_COLOR)"
-OK_STRING = $(OK_COLOR)[OK]$(NO_COLOR)
-ERROR_STRING= $(ERROR_COLOR)[ERRORS]$(NO_COLOR)
-WARN_STRING = $(WARN_COLOR)[WARNINGS]$(NO_COLOR)
+################################################################
+## Compilation
+################################################################
+%.pdf: %.tex
+ NAME=`basename $< .tex` ;\
+ echo -e "" ;\
+ echo -e "\t$(ERROR_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\
+ pdflatex -draftmode -interaction=nonstopmode $< > /dev/null ;\
+ if [ $$? = 0 ] ; then \
+ echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\
+ echo -e "\t$(OK_COLOR)Run PDFLaTeX again on $$NAME.tex$(NO_COLOR)" ;\
+ pdflatex -interaction=nonstopmode $< > /dev/null ;\
+ else \
+ echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\
+ exit 0;\
+ fi ;\
+ echo -e "\t$(OK_COLOR)Typesetting $$NAME finished $(NO_COLOR)" ;\
+%.ps: %.tex
+ NAME=`basename $< .tex` ;\
+ echo -e "" ;\
+ echo -e "\t$(ERROR_COLOR)Typesetting $$NAME$(NO_COLOR)" ;\
+ latex -draftmode -interaction=nonstopmode $< > /dev/null ;\
+ if [ $$? = 0 ] ; then \
+ echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\
+ echo -e "\t$(OK_COLOR)Run LaTeX again on $$NAME.tex$(NO_COLOR)" ;\
+ latex -interaction=nonstopmode $< > /dev/null ;\
+ dvips -q $$NAME.dvi ;\
+ ps2pdf $$NAME.ps ;\
+ else \
+ echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\
+ exit 0;\
+ fi ;\
+ echo -e "\t$(OK_COLOR)Typesetting $$NAME done$(NO_COLOR)" ;\
+################################################################
+## Compilation
+################################################################
docsty: $(PACKAGE).dtx
- $(PDFLATEX) $(PACKAGE).dtx
- $(MAKEIDX) -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo
- $(MAKEIDX) -s gind.ist $(PACKAGE).idx
- $(PDFLATEX) $(PACKAGE).dtx
- $(PDFLATEX) $(PACKAGE).dtx
+ echo -e "" ;\
+ echo -e "\t$(ERROR_COLOR)Typesetting $(PACKAGE).dtx$(NO_COLOR)" ;\
+ pdflatex -draftmode -interaction=nonstopmode $(PACKAGE).dtx > /dev/null ;\
+ if [ $$? = 0 ] ; then \
+ echo -e "\t$(OK_COLOR)compilation in draftmode without erros$(NO_COLOR)" ;\
+ makeindex -q -t $(PACKAGE).glolog -s gglo.ist -o $(PACKAGE).gls $(PACKAGE).glo ;\
+ if [ $$? = 0 ] ; then \
+ echo -e "\t$(OK_COLOR)compilation of Glossar without errors$(NO_COLOR)" ;\
+ fi ;\
+ makeindex -q -t $(PACKAGE).idxlog -s gind.ist $(PACKAGE).idx ;\
+ if [ $$? = 0 ] ; then \
+ echo -e "\t$(OK_COLOR)compilation of Index without errors$(NO_COLOR)" ;\
+ fi ;\
+ pdflatex $(PACKAGE).dtx > /dev/null ;\
+ if [ $$? = 0 ] ; then \
+ echo -e "\t$(OK_COLOR)Second pdflatex compilation without erros$(NO_COLOR)" ;\
+ else \
+ echo -e "\t$(ERROR_COLOR)Second pdflatex compilation with erros$(NO_COLOR)" ;\
+ exit 0;\
+ fi ;\
+ pdflatex $(PACKAGE).dtx > /dev/null ;\
+ else \
+ echo -e "\t$(ERROR_COLOR)compilation in draftmode with erros$(NO_COLOR)" ;\
+ exit 0;\
+ fi ;\
+
+examples: $(EXAMPLED).pdf $(EXAMPLET).pdf $(EXAMPLEP).ps $(EXAMPLESX).pdf
+
+exampled: $(EXAMPLED).pdf
+examplet: $(EXAMPLET).pdf
+examplep: $(EXAMPLEP).ps
+examplesx:$(EXAMPLESX).pdf
-examples: $(EXAMPLEA).dtx
-#EXAMPLEA
- $(PDFLATEX) $(EXAMPLEA).dtx
- $(PDFLATEX) $(EXAMPLEA).dtx
-#EXAMPLED
- $(PDFLATEX) $(EXAMPLED).tex
- $(PDFLATEX) $(EXAMPLED).tex
-#EXAMPLET
- $(PDFLATEX) $(EXAMPLET).tex
- $(PDFLATEX) $(EXAMPLET).tex
-#EXAMPLEP
- $(LATEX) $(EXAMPLEP).tex
- $(LATEX) $(EXAMPLEP).tex
- $(DVIPS) $(EXAMPLEP).dvi
- $(PSPDF) $(EXAMPLEP).ps
-#EXAMPLESX
- $(PDFLATEX) $(EXAMPLESX).tex
- $(PDFLATEX) $(EXAMPLESX).tex
+clean:
+ echo "" ;\
+ echo -e "\t$(ERROR_COLOR)Start removing help files$(NO_COLOR)" ;\
+ for I in $(FILELIST) ;\
+ do \
+ for J in $(AUXFILES) ;\
+ do \
+ rm -rf $$I.$$J ;\
+ done ;\
+ done ;\
+ echo -e "\t$(OK_COLOR)Removing finished$(NO_COLOR)" ;\
+all: docsty examples clean
changeversion:
@@ -59,26 +132,3 @@ changeversion:
@read -p "Bitte neue Version eingeben: " REPLY && sed -rie "s/(\\\\def\\\\mdversion\{).*(})/\1$$REPLY\2/" $(PACKAGE).dtx&&\
echo -e "$(OK_COLOR)Version geändert zu $$REPLY$(NO_COLOR)"
@echo
-
-
-clean:
- @echo
- @echo -e "$(ERROR_COLOR)Alle Dateien ausser *.tex, *.sty,"
- @echo -e "*.mdf, *.pdf, README, Makefile und *.zip"
- @echo -e "werden geloescht"
- @echo -e "$(WARN_COLOR)" ;
- @echo -e "Useless files of mdframed will be removed" ;
- for file in $(EXAMPLLIST) ; \
- do \
- echo -e "Useless files of $$file will be removed" ;\
- rm -rf $$file.aux $$file.glo $$file.hd $$file.idx $$file.dvi $$file.ps\
- $$file.log $$file.out $$file.synctex.gz $$file.thm $$file.tmp $$file.toc ; \
- done
- @echo -e "Useless files of mdframed package will be removed" ;
- @rm -rf $(PACKAGE).aux $(PACKAGE).dtxe $(PACKAGE).glo $(PACKAGE).gls $(PACKAGE).hd $(PACKAGE).ins $(PACKAGE).idx \
- $(PACKAGE).ilg $(PACKAGE).ind $(PACKAGE).log $(PACKAGE).out $(PACKAGE).thm $(PACKAGE).toc ;
- @echo -e "$(OK_COLOR)Löschvorgang abgeschlossen$(NO_COLOR)"
-
-all: docsty examples clean
-
-