File: rules.in

package info (click to toggle)
auctex 9.9p-13
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,328 kB
  • ctags: 761
  • sloc: lisp: 11,769; makefile: 197
file content (134 lines) | stat: -rw-r--r-- 4,620 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
#include "variables"
<:##############################################################################:>//
<:# WARNING: The rules file AUTOMATICALLY REGENERATE itself from this very one #:>//
<:#     Read the GNU Make Manual if you don't understand Makefile Remaking!    #:>//
<:##############################################################################:>//
#! /usr/bin/make -f
#
# BEWARE: The rules file is AUTOMATICALLY GENERATED from rules.in
#
# rules file for Debian <:=$PACKAGE:> package.
# $Id: rules.in,v 1.7 2000/01/20 14:33:49 salve Exp $
#
<:=@COPYRIGHT:>//

tmp	:= $(shell pwd)/debian/tmp/

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

DFILES	:=	debian/README debian/conffiles debian/config debian/copyright \
		debian/cron debian/docbase debian/install debian/preinst \
		debian/postinst debian/prerm debian/postrm debian/remove \
		debian/templates debian/<:=$UPDATE:> debian/<:=$UPDATE:>.8
# WARNING: The man page should be manually fixed in case of $UPDATE variations.
# WARNING: debian/rules SHOULD NOT be in $(DFILES), for Debian policy
# (it's CVS registered), lest it will be deleted by clean.
# Beside, it's automatically remade by make

debian/system.variables: /home/salve/Debian/Packages/system.variables
	$(INSTDATA) $< $@

# Eperl is simply great: thanks, Ralf!
% :: %.in
	eperl -P -o $@ $<

build: $(DFILES) debian/variables
	$(checkdir)
	-cat debian/japanese-patch | patch --forward --reject-file=debian/trashcan
	cd doc && $(MAKE) auctex
	cd doc && $(MAKE) auc-tex_toc.html
	touch build

clean:
	$(checkdir)
	-rm -rf build core debian/trashcan $(tmp) debian/{files*,substvars}
	-rm -f $(DFILES)
	-rm -f $$(find . -name \*.elc)
	-cat debian/japanese-patch | patch --forward --reverse --reject-file=debian/trashcan
	-$(MAKE) clean

binary: binary-indep binary-arch

binary-arch: checkroot build
	$(checkdir)

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

# install package
	$(INSTDIR) $(tmp)/<:=$info:> $(tmp)/<:=$lisp:> $(tmp)/<:=$style:>
	$(INSTDATA) <:=$SOURCES:> $(tmp)/<:=$lisp:>
	$(INSTDATA) <:=$MULESRC:> $(tmp)/<:=$lisp:>
	$(INSTDATA) <:=$XSRC:> $(tmp)/<:=$lisp:>
	$(INSTDATA) <:=$STYLES:> $(tmp)/<:=$style:>
	cd doc && $(MAKE) install infodir=$(tmp)/<:=$info:>
#       Consistency rule.
	cd $(tmp)/<:=$info:> \
	&& echo -e ",s/auctex-/auctex.info-/g\n,wq" | ed auctex \
	&& for i in auctex*; \
		do mv -f -- $$i auctex.info$${i#auctex}; \
	done
	gzip -9frv $(tmp)/<:=$info:>

# install Debian doc
	$(INSTDIR) $(tmp)/<:=$doc:> $(tmp)/<:=$docsrc:> $(tmp)/<:=$html:> $(tmp)/<:=$man:>/man8/
	$(INSTDATA) <:=$DOCS:> $(tmp)/<:=$doc:>
	$(INSTDATA) <:=$DOCSRC:> $(tmp)/<:=$docsrc:>
	$(INSTDATA) debian/README $(tmp)/<:=$doc:>/README.Debian
	$(INSTDATA) ChangeLog $(tmp)/<:=$doc:>
	$(INSTDATA) debian/changelog $(tmp)/<:=$doc:>/changelog.Debian
	$(INSTDATA) debian/japanese-patch{,-copyright} $(tmp)/<:=$doc:>
	gzip -9frv $(tmp)/<:=$doc:>
	ln -sf ChangeLog.gz $(tmp)/<:=$doc:>/changelog.gz
	$(INSTDATA) debian/copyright $(tmp)/<:=$doc:>
	$(INSTDATA) doc/*.html $(tmp)/<:=$html:>
	ln -snf auc-tex_toc.html $(tmp)/<:=$html:>/index.html
	$(INSTDATA) debian/<:=$UPDATE:>.8 $(tmp)/<:=$man:>/man8/
	gzip -9frv $(tmp)/<:=$man:>

# install Debian system files
	$(INSTDIR) $(tmp)/<:=$lisp:> $(tmp)/<:=$cron_weekly:> $(tmp)/<:=$sbin:> \
		$(tmp)/<:=$ecode:>/{install,remove} $(tmp)/<:=$docbase:> \
		$(tmp)/<:=$var:>
	$(INSTDATA) tex-site.el $(tmp)/<:=$lisp:>/../
	$(INSTDATA) debian/docbase $(tmp)/<:=$docbase:>/<:=$PACKAGE:>
	$(INSTSCRIPT) debian/cron $(tmp)/<:=$cron_weekly:>/<:=$PACKAGE:>
	$(INSTSCRIPT) debian/<:=$UPDATE:> $(tmp)/<:=$sbin:>
	$(INSTSCRIPT) debian/install $(tmp)/<:=$ecode:>/install/<:=$PACKAGE:>
	$(INSTSCRIPT) debian/remove $(tmp)/<:=$ecode:>/remove/<:=$PACKAGE:>

# install Debian control files
	$(INSTDIR) $(tmp)/<:=$debian:>
	$(INSTDATA) debian/{conffiles,templates} $(tmp)/<:=$debian:>
	$(INSTSCRIPT) debian/{config,preinst,postinst,postrm,prerm} $(tmp)/<:=$debian:>

# standard stuff
#-#	cd $(tmp) && du -k * | grep -v 'DEBIAN' | sort -k 2 -o $(tmp)/<:=$debian:>/du
	cd $(tmp) && md5sum \
		$$(find ./ -path './DEBIAN' -prune -o -type f -printf "%P\n") \
		| sort -k 2 -o $(tmp)/<:=$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:
:>//