File: Makefile

package info (click to toggle)
bibclean 2.11.4-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,204 kB
  • ctags: 1,545
  • sloc: ansic: 10,711; makefile: 817; perl: 65; sh: 40; awk: 27; sed: 6
file content (106 lines) | stat: -rw-r--r-- 2,994 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#=======================================================================
# Makefile for bibclean TUBboat article and GNU Emacs info documentation
# [03-May-1996] -- update style and macro files with latest versions,
#		   update GNU standard targets, and update spelling
#		   error checks to use style of TUG bibliography 
#		   collection
# [31-Dec-1993] -- final polishing of Makefile for public release
#                  after TUGboat publication
# [04-May-1993] -- add bundle, SHAR, SHARFILES, and add quoting of @
#		   in index
# [14-Jan-1993]
#=======================================================================
BIBTEX		= bibtex
CP		= /bin/cp
DETEX		= detex
DW		= dw
ISPELL		= ispell
LATEX		= latex
MAKEINDEX 	= makeindex
MV		= /bin/mv
RM		= /bin/rm -f
SED		= sed
SHAR		= shar -c -v
SHARFILES       = Makefile bibclean.aux bibclean.bbl bibclean.bib \
		  bibclean.idx bibclean.ind bibclean.lot bibclean.ltx \
		  bibclean.sok bibclean.sty bibclean.toc is-plain.bst
SPELL		= spell
TEXINDEX 	= texindex

ALL:	bibclean.dvi

all:	bibclean.ser dw bibclean.dvi

bibclean.aux:
	if [ ! -f bibclean.aux ] ; then touch bibclean.aux ; fi

bibclean.bbl:	bibclean.bib bibclean.aux
	if [ ! -f bibclean.aux ] ; then touch bibclean.aux ; fi
	-$(BIBTEX) bibclean

bibclean.dvi:	bibclean.bbl bibclean.ltx bibclean.ind bibclean.sty
	$(LATEX) bibclean.ltx
	$(MAKE) bibclean.bbl bibclean.ind
	$(LATEX) bibclean.ltx
	$(LATEX) bibclean.ltx

bibclean.idx:
	if [ ! -f bibclean.idx ] ; then touch bibclean.idx ; fi

bibclean.ind:	bibclean.idx Makefile
	$(MV) bibclean.idx bibclean.idw
	$(SED) -e 's/{\\tt <}@/<@/' \
		-e 's/{\\tt >}@/>@/' \
		-e 's/{\\%\\%@{\\tt \\%\\%}}/{\\%\\%@{\\protect\\tt \\%\\%}}/' \
		-e 's/@@{\\tt @}/"@@{\\tt "@}/' \
		-e 's/{@@{\\tt @}}/{"@@{\\tt "@}}/' \
		-e 's/\\{ */\\{/g' \
		-e 's/\\} */\\}/g' \
		<bibclean.idw >bibclean.idx
	-$(MAKEINDEX) bibclean

bibclean.ser:	bibclean.ltx bibclean.sok
	if [ ! -f bibclean.sok ] ; then touch bibclean.sok ; fi
	@echo '==================== spelling exceptions ===================='
	$(DETEX) bibclean.ltx | $(SED) -e 's/[0-9,.:;]/ /g' | \
		$(SPELL) +bibclean.sok >bibclean.ser
	$(DETEX) bibclean.ltx | $(SED) -e 's/[0-9,.:;]/ /g' | \
		$(ISPELL) -l -p bibclean.sok | sort -u >>bibclean.ser
	cat bibclean.ser

bundle:	$(SHARFILES)
	$(SHAR) $(SHARFILES) >$@

clean mostlyclean:
	$(RM) *.blg
#	$(RM) *.dvi*
	$(RM) *.idw
	$(RM) *.ilg
	$(RM) *.log
	$(RM) *.o
	$(RM) *.ser
	$(RM) *.tmp
	$(RM) *~
	$(RM) \#*
	$(RM) core

clobber distclean:	clean
	$(RM) *.aux
	$(RM) *.bbl
	$(RM) *.idx
	$(RM) *.ind
	$(RM) *.lof
	$(RM) *.lot
	$(RM) *.toc

# We strip \index{} entries first to avoid large numbers of bogus duplicate
# word warnings.
dw:
	@echo '==================== doubled words ===================='
	$(SED) -e 's/^ *\\index{.*$$//' bibclean.ltx | $(DETEX) | $(DW)

maintainer-clean: distclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."

spell: bibclean.ser