File: rules

package info (click to toggle)
auctex 9.9j-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,248 kB
  • ctags: 767
  • sloc: lisp: 11,580; makefile: 290; sh: 223
file content (152 lines) | stat: -rwxr-xr-x 5,024 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#! /usr/bin/make -f
#
# rules file for Debian auctex package.
# $Id: rules,v 1.25 1998/09/03 10:06:28 salve Exp $
#
# Copyright  Davide G. M. Salvetti <salve@debian.org>, 1997, 1998.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to: The Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# On Debian GNU/Linux System you can find a copy of the GNU General Public
# License in /usr/doc/copyright/GPL.

package	:= auctex
#-=-
DOCS	:= CHANGES README PROBLEMS doc/{math-ref.tex,tex-ref.tex}
AUCSRC	:= auc-old.el tex.el tex-buf.el latex.el tex-info.el texmathp.el multi-prompt.el
CONTRIB	:= bib-cite.el font-latex.el tex-jp.el hilit-LaTeX.el
#	   tex-jp.el		# Doesn't compile without MULE
#	   hilit-LaTeX.el	# Doesn't compile without X
STYLES	:= style/slides.el    style/foils.el    style/amstex.el \
	   style/article.el   style/book.el     style/letter.el \
	   style/report.el    style/amsart.el   style/amsbook.el \
	   style/epsf.el      style/psfig.el    style/latexinfo.el \
	   style/dutch.el     style/german.el   style/dk.el \
	   style/j-article.el style/j-book.el   style/j-report.el \
	   style/jarticle.el  style/jbook.el    style/jreport.el \
	   style/dinbrief.el  style/virtex.el   style/plfonts.el \
	   style/plhb.el      style/harvard.el	style/swedish.el \
	   style/danish.el    style/slovak.el   style/czech.el \
	   style/amsmath.el   style/amstext.el  style/amsbsy.el \
	   style/amsopn.el    style/amsthm.el	style/natbib.el
#-=-

tmp	:= $(shell pwd)/debian/tmp/
usr	:= $(tmp)/usr/
info	:= $(usr)/info/
slisp	:= $(usr)/share/emacs/site-lisp/
lisp	:= $(slisp)/$(package)/
style	:= $(lisp)/style

DEBIAN 	:= $(tmp)/DEBIAN/
doc	:= $(usr)/doc/$(package)/
html	:= $(doc)/$(package).html/
man8	:= $(usr)/man/man8/
cron	:= $(tmp)/etc/cron.weekly/
menu	:= $(usr)/lib/menu/
emacsen	:= $(usr)/lib/emacsen-common/packages/
sbin	:= $(usr)/sbin/
varauc	:= $(tmp)/var/lib/auctex/

SHELL		:= /bin/bash
INSTDIR		:= install -m 755 -d
INSTPROG	:= install -m 755 -s
INSTDATA	:= install -m 644
INSTSCRIPT	:= install -m 755

build:
	$(checkdir)
	cd doc && $(MAKE) auctex
	cd doc && $(MAKE) auc-tex_toc.html
	touch build

clean:
	$(checkdir)
	-rm -rf build core $(tmp) debian/files* debian/substvars
	-rm -f $$(find . -name \*.elc)
	-$(MAKE) clean

binary: binary-indep binary-arch

binary-arch: checkroot build
	$(checkdir)

binary-indep: checkroot build
	$(checkdir)
	-rm -rf $(tmp)

# install package
	$(INSTDIR) $(info) $(lisp) $(style)
	$(INSTDATA) $(AUCSRC) $(lisp)
	$(INSTDATA) $(STYLES) $(style)
	$(INSTDATA) $(CONTRIB) $(lisp)
	cd doc && $(MAKE) install infodir=$(info)
	gzip -9frv $(info)

# install Debian doc
	$(INSTDIR) $(doc) $(html) $(man8)
	$(INSTDATA) $(DOCS) $(doc)
	$(INSTDATA) debian/README $(doc)/README.Debian
	$(INSTDATA) ChangeLog $(doc)/changelog
	$(INSTDATA) debian/changelog $(doc)/changelog.Debian
	gzip -9frv $(doc)
	$(INSTDATA) debian/copyright $(doc)
	$(INSTDATA) doc/*.html $(html)
	ln -snf auc-tex_toc.html $(html)/index.html
	$(INSTDATA) debian/update-auctex-elisp.8 $(man8)
	gzip -9frv $(man8)
#	compatibility link: this should eventually disappear
#	ln -snf update-auctex-elisp.8.gz $(man8)/auctex-auto-load.8.gz

# install Debian system files
	$(INSTDIR) $(slisp) $(cron) $(menu) $(sbin) $(emacsen)/{install,remove} $(varauc)
	$(INSTDATA) tex-site.el $(slisp)
	$(INSTSCRIPT) debian/auctex.cron $(cron)/auctex
	$(INSTDATA) debian/auctex.menu $(menu)/auctex
	$(INSTSCRIPT) debian/update-auctex-elisp $(sbin)
#	compatibility link: this should eventually disappear
#	ln -snf update-auctex-elisp $(sbin)/auctex-auto-load
	$(INSTSCRIPT) debian/emacsen.install $(emacsen)/install/$(package)
	$(INSTSCRIPT) debian/emacsen.remove $(emacsen)/remove/$(package)

# install Debian control files
	$(INSTDIR) $(DEBIAN)
	$(INSTDATA) debian/conffiles $(DEBIAN)
	$(INSTSCRIPT) debian/{preinst,postinst,prerm,postrm} $(DEBIAN)

# standard stuff
#-#	cd $(tmp) && du -k * | grep -v 'DEBIAN' | sort -k 2 -o $(DEBIAN)/du
	cd $(tmp) && md5sum \
		$$(find ./ -path './DEBIAN' -prune -o -type f -printf "%P\n") \
		| sort -k 2 -o $(DEBIAN)/md5sums
	dpkg-gencontrol
	chown -R root.root $(tmp)
	chmod -R go=rX $(tmp)
	dpkg --build $(tmp) ..

checkdir = test -f debian/rules

checkroot:
	$(checkdir)
	test root = "$$(whoami)"

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

.PHONY: binary binary-arch binary-indep clean checkroot

### Local Variables:
### mode: makefile
### End: