summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/nameauth/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/nameauth/Makefile')
-rw-r--r--Master/texmf-dist/doc/latex/nameauth/Makefile92
1 files changed, 40 insertions, 52 deletions
diff --git a/Master/texmf-dist/doc/latex/nameauth/Makefile b/Master/texmf-dist/doc/latex/nameauth/Makefile
index f5c6c35da7e..e3989ed9cba 100644
--- a/Master/texmf-dist/doc/latex/nameauth/Makefile
+++ b/Master/texmf-dist/doc/latex/nameauth/Makefile
@@ -1,52 +1,40 @@
-engine ?= pdflatex # Override on the command line
- # with engine=latex
- # or with engine=xelatex
- # or with engine=lualatex.
- # If with lualatex, then use the fullpdf target.
-
-# The default builds the distribution uploaded to CTAN.
-dist: pdf clean
-
-# Making this target includes the code listing
-fullpdf : sty
- $(engine) nameauth.dtx
- makeindex -s gglo.ist -o nameauth.gls nameauth.glo
- makeindex -s gind.ist -o nameauth.ind nameauth.idx
- $(engine) nameauth.dtx
- $(engine) nameauth.dtx
-
-# This target omits the code listing.
-pdf : sty
- $(engine) -draftmode "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
- makeindex -s gglo.ist -o nameauth.gls nameauth.glo
- makeindex -s gind.ist -o nameauth.ind nameauth.idx
- $(engine) "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
- $(engine) "\AtBeginDocument{\OnlyDescription} \input nameauth.dtx"
-
-# Build the package.
-sty : nameauth.dtx nameauth.ins
- $(engine) nameauth.ins
-
-# Instead of using the shell to see if files exist, take advantage of rm.
-clean :
- rm -f nameauth.aux
- rm -f nameauth.glo
- rm -f nameauth.gls
- rm -f nameauth.idx
- rm -f nameauth.ilg
- rm -f nameauth.ind
- rm -f nameauth.log
- rm -f nameauth.out
- rm -f nameauth.toc
- rm -f nameauth.hd
- rm -f nameauth.top
- rm -f texput.*
-
-# Remove all but the barest source files.
-clobber : clean
- rm -f nameauth.dvi
- rm -f nameauth.pdf
- rm -f nameauth.sty
- touch nameauth.*
-
-
+NAME = nameauth
+ENGINE ?= pdflatex
+# On the command line:
+# make ENGINE=latex
+# make ENGINE=xelatex
+# make ENGINE=lualatex
+SHELL = bash
+PWD = $(shell pwd)
+VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//')
+LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
+UTREE = $(shell kpsewhich --var-value TEXMFHOME)
+all: $(NAME).pdf
+ test -e README.txt && mv README.txt README || exit 0
+$(NAME).pdf: $(NAME).dtx
+ $(ENGINE) -shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null
+ $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+ if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
+ if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
+ $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+ $(ENGINE) --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+clean:
+ rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc} README.txt
+distclean: clean
+ rm -f $(NAME).{pdf,sty} README
+inst: all
+ mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
+ cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
+ cp Makefile $(UTREE)/source/latex/$(NAME)
+ cp $(NAME).sty $(UTREE)/tex/latex/$(NAME)
+ cp $(NAME).pdf $(UTREE)/doc/latex/$(NAME)
+install: all
+ sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
+ sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
+ sudo cp Makefile $(LOCAL)/source/latex/$(NAME)
+ sudo cp $(NAME).sty $(LOCAL)/tex/latex/$(NAME)
+ sudo cp $(NAME).pdf $(LOCAL)/doc/latex/$(NAME)
+zip: all
+ ln -sf . $(NAME)
+ zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,Makefile,$(NAME).{pdf,dtx}}
+ rm $(NAME)