| 1 |
#======================================================================= |
| 2 |
# Makefile for bibclean TUBboat article and GNU Emacs info documentation |
| 3 |
# [23-Aug-2003] -- add rules for bibclean.pdf and bibclean.ps, and |
| 4 |
# remove dependencies on .bbl and .ind files to prevent |
| 5 |
# unnecessary rebuilds |
| 6 |
# [03-May-1996] -- update style and macro files with latest versions, |
| 7 |
# update GNU standard targets, and update spelling |
| 8 |
# error checks to use style of TUG bibliography |
| 9 |
# collection |
| 10 |
# [31-Dec-1993] -- final polishing of Makefile for public release |
| 11 |
# after TUGboat publication |
| 12 |
# [04-May-1993] -- add bundle, SHAR, SHARFILES, and add quoting of @ |
| 13 |
# in index |
| 14 |
# [14-Jan-1993] |
| 15 |
#======================================================================= |
| 16 |
BIBTEX = bibtex |
| 17 |
CP = /bin/cp |
| 18 |
DETEX = detex |
| 19 |
DVIPS = dvips -Pcmr |
| 20 |
DVIPS = dvips-type1 |
| 21 |
DW = dw |
| 22 |
ISPELL = ispell |
| 23 |
LATEX = latex |
| 24 |
MAKEINDEX = makeindex |
| 25 |
MV = /bin/mv |
| 26 |
PS2PDF = ps2pdf |
| 27 |
PS2PDF = distill |
| 28 |
RM = /bin/rm -f |
| 29 |
SED = sed |
| 30 |
SHAR = shar -c -v |
| 31 |
SHARFILES = Makefile bibclean.aux bibclean.bbl bibclean.bib \ |
| 32 |
bibclean.idx bibclean.ind bibclean.lot bibclean.ltx \ |
| 33 |
bibclean.sok bibclean.sty bibclean.toc is-plain.bst |
| 34 |
SPELL = spell |
| 35 |
TEXINDEX = texindex |
| 36 |
|
| 37 |
ALL: bibclean.dvi bibclean.ps bibclean.pdf |
| 38 |
|
| 39 |
all: bibclean.ser dw bibclean.dvi |
| 40 |
|
| 41 |
bibclean.aux: |
| 42 |
if [ ! -f bibclean.aux ] ; then touch bibclean.aux ; fi |
| 43 |
|
| 44 |
bibclean.bbl: bibclean.bib bibclean.aux |
| 45 |
if [ ! -f bibclean.aux ] ; then touch bibclean.aux ; fi |
| 46 |
-$(BIBTEX) bibclean |
| 47 |
|
| 48 |
bibclean.dvi: bibclean.ltx bibclean.sty |
| 49 |
$(LATEX) bibclean.ltx |
| 50 |
$(MAKE) bibclean.bbl bibclean.ind |
| 51 |
$(LATEX) bibclean.ltx |
| 52 |
$(LATEX) bibclean.ltx |
| 53 |
|
| 54 |
bibclean.idx: |
| 55 |
if [ ! -f bibclean.idx ] ; then touch bibclean.idx ; fi |
| 56 |
|
| 57 |
bibclean.ind: bibclean.idx Makefile |
| 58 |
$(MV) bibclean.idx bibclean.idw |
| 59 |
$(SED) -e 's/{\\tt <}@/<@/' \ |
| 60 |
-e 's/{\\tt >}@/>@/' \ |
| 61 |
-e 's/{\\%\\%@{\\tt \\%\\%}}/{\\%\\%@{\\protect\\tt \\%\\%}}/' \ |
| 62 |
-e 's/@@{\\tt @}/"@@{\\tt "@}/' \ |
| 63 |
-e 's/{@@{\\tt @}}/{"@@{\\tt "@}}/' \ |
| 64 |
-e 's/\\{ */\\{/g' \ |
| 65 |
-e 's/\\} */\\}/g' \ |
| 66 |
<bibclean.idw >bibclean.idx |
| 67 |
-$(MAKEINDEX) bibclean |
| 68 |
|
| 69 |
bibclean.pdf: bibclean.ps |
| 70 |
$(MV) bibclean.log bibclean.log.save |
| 71 |
$(PS2PDF) $? |
| 72 |
$(MV) bibclean.log.save bibclean.log |
| 73 |
|
| 74 |
bibclean.ps: bibclean.dvi |
| 75 |
$(DVIPS) -o $@ $? |
| 76 |
|
| 77 |
bibclean.ser: bibclean.ltx bibclean.sok |
| 78 |
if [ ! -f bibclean.sok ] ; then touch bibclean.sok ; fi |
| 79 |
@echo '==================== spelling exceptions ====================' |
| 80 |
$(DETEX) bibclean.ltx | $(SED) -e 's/[0-9,.:;]/ /g' | \ |
| 81 |
$(SPELL) +bibclean.sok >bibclean.ser |
| 82 |
$(DETEX) bibclean.ltx | $(SED) -e 's/[0-9,.:;]/ /g' | \ |
| 83 |
$(ISPELL) -l -p bibclean.sok | sort -u >>bibclean.ser |
| 84 |
cat bibclean.ser |
| 85 |
|
| 86 |
bundle: $(SHARFILES) |
| 87 |
$(SHAR) $(SHARFILES) >$@ |
| 88 |
|
| 89 |
clean mostlyclean: |
| 90 |
$(RM) *.blg |
| 91 |
$(RM) *.dvi* |
| 92 |
$(RM) *.idw |
| 93 |
$(RM) *.ilg |
| 94 |
$(RM) *.log |
| 95 |
$(RM) *.o |
| 96 |
$(RM) *.ser |
| 97 |
$(RM) *.tmp |
| 98 |
$(RM) *~ |
| 99 |
$(RM) \#* |
| 100 |
$(RM) core |
| 101 |
|
| 102 |
clobber distclean: clean |
| 103 |
$(RM) *.aux |
| 104 |
$(RM) *.bbl |
| 105 |
$(RM) *.idx |
| 106 |
$(RM) *.ind |
| 107 |
$(RM) *.lof |
| 108 |
$(RM) *.lot |
| 109 |
$(RM) *.toc |
| 110 |
|
| 111 |
# We strip \index{} entries first to avoid large numbers of bogus duplicate |
| 112 |
# word warnings. |
| 113 |
dw: |
| 114 |
@echo '==================== doubled words ====================' |
| 115 |
$(SED) -e 's/^ *\\index{.*$$//' bibclean.ltx | $(DETEX) | $(DW) |
| 116 |
|
| 117 |
maintainer-clean: distclean |
| 118 |
@echo "This command is intended for maintainers to use;" |
| 119 |
@echo "it deletes files that may require special tools to rebuild." |
| 120 |
$(RM) bibclean.pdf |
| 121 |
$(RM) bibclean.ps |
| 122 |
|
| 123 |
spell: bibclean.ser |