File: Makefile

package info (click to toggle)
slime 1%3A20100722-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,400 kB
  • ctags: 6,658
  • sloc: lisp: 37,391; ruby: 321; sh: 161; makefile: 126; awk: 10
file content (112 lines) | stat: -rw-r--r-- 3,475 bytes parent folder | download
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
107
108
109
110
111
112
# This file has been placed in the public domain.
#
# Where to put the info file(s). NB: the GNU Coding Standards (GCS)
# and the Filesystem Hierarchy Standard (FHS) differ on where info
# files belong. The GCS says /usr/local/info; the FHS says
# /usr/local/share/info. Many distros obey the FHS, but people who
# installed their emacs from source probably have a GCS-ish file
# hierarchy.
infodir=/usr/local/info

# What command to use to install info file(s)
INSTALL_CMD=install -m 644

# Info files generated here.
infofiles=slime.info

TEXI = slime.texi contributors.texi

all: slime.ps slime.info slime.html slime.pdf html/index.html slime-refcard.pdf

slime.dvi: $(TEXI)
	texi2dvi slime.texi

slime.ps: slime.dvi
	dvips -o $@ $<

slime.info: $(TEXI)
	makeinfo $<

slime.html: $(TEXI)
	texi2html $<

html/index.html: $(TEXI)
	makeinfo -o html --html $<

html.tgz: html/index.html
	tar -czf $@ html

DOCDIR=/project/slime/public_html/doc
# invoke this like: make CLUSER=heller publish
publish: html.tgz
	scp html.tgz $(CLUSER)@common-lisp.net:$(DOCDIR)
	ssh $(CLUSER)@common-lisp.net "cd $(DOCDIR); tar -zxf html.tgz"

slime.pdf: $(TEXI)
	texi2pdf $<

slime-refcard.pdf: slime-refcard.tex
	texi2pdf $<	

install: install-info

uninstall: uninstall-info

# Create contributors.texi, a texinfo table listing all known
# contributors of code.
#
# Explicitly includes Eric Marsden (pre-ChangeLog hacker)
#
# The gist of this horror show is that the contributor list is piped
# into texinfo-tabulate.awk with one name per line, sorted
# alphabetically.
#
# Some special-case TeX-escaping of international characters.
contributors.texi: ../ChangeLog Makefile texinfo-tabulate.awk
	cat ../ChangeLog | \
	sed -ne '/^[0-9]/{s/^[^ ]* *//; s/ *<.*//; p;}' | \
	sort | \
	uniq -c | \
	sort -nr| \
	sed -e 's/^[^A-Z]*//' | \
	awk -f texinfo-tabulate.awk | \
	sed -e "s/\o341/@'a/g" | \
        sed -e "s/\o355/@'{@dotless{i}}/g" | \
	sed -e "s/\o351/@'e/g" | \
	sed -e "s/\o361/@~n/g" | \
	sed -e 's/\o370/@o{}/g' \
	> $@

#.INTERMEDIATE: contributors.texi

# Debian's install-info wants a --section argument.
section := $(shell grep INFO-DIR-SECTION $(infofiles) | sed 's/INFO-DIR-SECTION //')
install-info: slime.info
	mkdir -p $(infodir)
	$(INSTALL_CMD) $(infofiles) $(infodir)/$(infofiles)
	@if (install-info --version && \
		install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
		echo "install-info --info-dir=$(infodir) $(infodir)/$(infofiles)";\
		install-info --info-dir="$(infodir)" "$(infodir)/$(infofiles)" || :;\
	else \
		echo "install-info --infodir=$(infodir) --section $(section) $(section) $(infodir)/$(infofiles)" && \
		install-info --infodir="$(infodir)" --section $(section) ${section} "$(infodir)/$(infofiles)" || :; fi

uninstall-info:
	@if (install-info --version && \
		install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
		echo "install-info --info-dir=$(infodir) --remove $(infodir)/$(infofiles)";\
		install-info --info-dir="$(infodir)" --remove "$(infodir)/$(infofiles)" || :;\
	else \
		echo "install-info --infodir=$(infodir) --remove $(infodir)/$(infofiles)";\
		install-info --infodir="$(infodir)" --remove "$(infodir)/$(infofiles)" || :; fi
	rm -f $(infodir)/$(infofiles)

SHELL=/bin/bash

clean:
	rm -f contributors.texi
	rm -f slime.{aux,cp,cps,fn,fns,ky,kys,log,pg,tmp,toc,tp,vr,vrs}
	rm -f slime.{info,pdf,dvi,ps,html,kys,fns,vrs}
	rm -f slime-refcard.{aux,log,pdf}
	rm -rf html{,.tgz}