summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/cdpbundl/Makefile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-02-11 00:11:40 +0000
committerKarl Berry <karl@freefriends.org>2015-02-11 00:11:40 +0000
commit13e3251ec8da9abe378dd662a288d2261ae9b8c0 (patch)
treeb89235b38a35350bc55dd9fff1d8b0107a7cb08c /Master/texmf-dist/doc/latex/cdpbundl/Makefile
parent06035cd2a957fc5063b466c181f360a743fc9d0a (diff)
cdpbundl (9feb15)
git-svn-id: svn://tug.org/texlive/trunk@36255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/cdpbundl/Makefile')
-rw-r--r--Master/texmf-dist/doc/latex/cdpbundl/Makefile122
1 files changed, 122 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/cdpbundl/Makefile b/Master/texmf-dist/doc/latex/cdpbundl/Makefile
new file mode 100644
index 00000000000..d2c09827c0c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cdpbundl/Makefile
@@ -0,0 +1,122 @@
+# makefile
+#
+# 2015 Feb 08
+#
+# Macro definitions
+ROOT_NAME = cdpbundl
+DTX_NAME = $(ROOT_NAME).dtx
+INS_NAME = $(ROOT_NAME).ins
+DOC_AUX_FIL = $(ROOT_NAME).aux $(ROOT_NAME).log \
+ $(ROOT_NAME).glo $(ROOT_NAME).gls \
+ $(ROOT_NAME).idx $(ROOT_NAME).ind $(ROOT_NAME).ilg \
+ $(ROOT_NAME).toc $(ROOT_NAME).lof \
+ $(ROOT_NAME).out
+DOCUM_FILE = $(ROOT_NAME).pdf
+CODE_FILES = letteracdp.cls \
+ articoletteracdp.cls \
+ cdpaddon.sty \
+ cdpbabel.sty \
+ *.ldf \
+ *.def \
+ cdpshues.cfg
+#
+LATEX = pdflatex
+MAKEINDEX = makeindex
+
+#
+define GEN_FAKE_INDEX
+ @echo '\\begin{theindex}' > $(ROOT_NAME).ind
+ @echo '\\end{theindex}' >> $(ROOT_NAME).ind
+ @echo "Generating fake .ind file."
+endef
+#
+define GEN_FAKE_GLOSSARY
+ @echo '\\begin{theglossary}' > $(ROOT_NAME).gls
+ @echo '\\end{theglossary}' >> $(ROOT_NAME).gls
+ @echo "Generating fake .gls file."
+endef
+
+
+
+.PHONY: default
+.PHONY: code doc
+.PHONY: clean cleandoc cleanaux cleancode cleanall
+.PHONY: help
+
+# Default target
+default: doc code
+
+# Generating the code
+code:
+ openout_any=r tex $(INS_NAME)
+
+# Generating the documentation
+doc: $(DOCUM_FILE)
+
+$(DOCUM_FILE): $(DTX_NAME)
+ # Hack for getting index and glossary in the toc since first run:
+ $(GEN_FAKE_INDEX)
+ $(GEN_FAKE_GLOSSARY)
+ # We know how many runs are needed:
+ $(LATEX) $(DTX_NAME)
+ $(LATEX) $(DTX_NAME)
+ $(MAKEINDEX) -s gind.ist -o $(ROOT_NAME).ind $(ROOT_NAME).idx
+ $(MAKEINDEX) -s gglo.ist -o $(ROOT_NAME).gls $(ROOT_NAME).glo
+ $(LATEX) $(DTX_NAME)
+ $(LATEX) $(DTX_NAME)
+
+# Cleaning up: command "make clean" defaults to "make cleanall"
+clean: cleanall
+
+# Cleaning the code files
+cleancode:
+ -rm $(CODE_FILES)
+
+# Cleaning the documentation files
+cleandoc: cleanaux
+ -rm $(DOCUM_FILE)
+
+# Cleanng just the auxiliary files used in producing the documentation
+cleanaux:
+ -rm $(DOC_AUX_FIL)
+
+# Cleaning up all the generated files
+cleanall: cleancode cleandoc
+
+# Giving help
+help:
+ @echo "Here is a list of the available commands:"
+ @echo
+ @echo " make"
+ @echo " Generate both the code and the documentation (see below)."
+ @echo
+ @echo " make code"
+ @echo " Generate the LaTeX sources for all the classes, packages,"
+ @echo " definition files, etc. of the C.D.P. Bundle; these files go"
+ @echo " into the LaTeX input directories."
+ @echo
+ @echo " make doc"
+ @echo " Generate the documentation (in PDF); the resulting PDF file"
+ @echo " goes into the LaTeX documentation directories (the auxiliary"
+ @echo " files may be discarded)."
+ @echo
+ @echo " make clean"
+ @echo " make cleanall"
+ @echo " These two commands are synonyms; they remove all of the"
+ @echo " generated files (both code and documentation)."
+ @echo
+ @echo " make cleancode"
+ @echo " Remove the LaTeX source files (the \"code files\")."
+ @echo
+ @echo " make cleandoc"
+ @echo " Remove the documentation, together with all the auxiliary"
+ @echo " files used to generate it."
+ @echo
+ @echo " make cleanaux"
+ @echo " Remove only the auxiliary files used to generate the"
+ @echo " documentation."
+ @echo
+ @echo " make help"
+ @echo " Print this help message."
+ @echo
+