summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/srcredact/Makefile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-25 22:41:38 +0000
committerKarl Berry <karl@freefriends.org>2015-10-25 22:41:38 +0000
commit4a0798e9378fdb2de85f56e1ef1d46653f86cc69 (patch)
treeb746b646538d7af86ae1c87e0b5c2ea708451885 /Master/texmf-dist/doc/support/srcredact/Makefile
parentf68a915f164bf116f1bb31ab3e1d9f5b94824e29 (diff)
srcredact (25oct15)
git-svn-id: svn://tug.org/texlive/trunk@38710 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/srcredact/Makefile')
-rw-r--r--Master/texmf-dist/doc/support/srcredact/Makefile80
1 files changed, 80 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/srcredact/Makefile b/Master/texmf-dist/doc/support/srcredact/Makefile
new file mode 100644
index 00000000000..9d55f72d653
--- /dev/null
+++ b/Master/texmf-dist/doc/support/srcredact/Makefile
@@ -0,0 +1,80 @@
+PACKAGE=srcredact
+WD = $(shell pwd)
+CURRDIR = $(notdir ${WD})
+
+
+TEXFILES = srcredact.tex
+
+PODS = srcredact.pod
+
+MAN1 = ${PODS:%.pod=%.1}
+
+SAMPLEPDFS = \
+ twain1-default.pdf twain1-uppercase.pdf twain1-nobonds.pdf \
+ twain2-default.pdf twain2-uppercase.pdf twain2-nobonds.pdf
+
+DOCS = ${TEXFILES:%.tex=%.pdf} ${MAN1} ${SAMPLEPDFS}
+
+
+
+SCRIPTS = srcredact.pl
+
+
+
+all: ${DOCS}
+ perl -c ${SCRIPTS}
+ chmod a+x ${SCRIPTS}
+
+%.pdf: %.tex srcredact-man.tex
+ pdflatex $<
+ - for file in *.aux; do bibtex $$file; done
+ pdflatex $<
+ while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log || \
+ grep -q '^Package pdfscreen Warning: TOC file not available' $*.log ||\
+ grep -q '^Package natbib Warning: Citation(s) may have changed' $*.log)\
+ do pdflatex $*; done
+
+srcredact-man.tex: srcredact.pod
+ pod2latex -out $@ -h1level 2 $<
+
+%.1: %.pod
+ pod2man -c "Text tools" -r "1.0" $< >$@
+
+twain1-%.tex: twain1.tex srcredact.pl
+ perl srcredact.pl -e $* twain1.tex > $@
+
+twain2-%.tex: twain2.tex srcredact.pl
+ perl srcredact.pl -e $* twain2.tex > $@
+
+twain2.tex: twain1.tex twain-edited.tex
+ perl srcredact.pl -u nobonds twain1.tex twain-edited.tex > $@
+
+clean:
+ $(RM) *.aux *.bbl *.dvi *.log *.out *.toc *.blg *.lof *.lot *.zip \
+ *.ps *.tgz depend *.4* *.css *.idv *.lg *.xref *~ *.tmp \
+ srcredact-man.tex
+
+
+.PRECIOUS: \
+ twain1-uppercase.tex twain1-default.tex twain1-nobonds.tex \
+ twain2-uppercase.tex twain2-default.tex twain2-nobonds.tex \
+ twain2.tex
+
+distclean: clean
+ $(RM) ${DOCS} *.1 twain1-* twain2*
+
+archive: all clean
+ cd ..; \
+ tar -czvf $(PACKAGE).tgz --exclude 'debug*' \
+ --exclude '*~' --exclude '*.tgz' --exclude '*.zip' \
+ --exclude CVS $(CURRDIR); \
+ mv $(PACKAGE).tgz $(CURRDIR); \
+ cd $(CURRDIR)
+
+
+zip: all clean
+ cd ..; \
+ zip -r $(PACKAGE).zip $(CURRDIR) \
+ -x 'debug*' -x '*~' -x '*.tgz' -x '*.zip' -x CVS -x '*/CVS/*'; \
+ mv $(PACKAGE).zip $(CURRDIR); \
+ cd $(CURRDIR)