File: Makefile

package info (click to toggle)
jargon-text 4.4.7-4
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 5,988 kB
  • ctags: 3
  • sloc: xml: 143,054; makefile: 73; sh: 6
file content (74 lines) | stat: -rw-r--r-- 2,255 bytes parent folder | download | duplicates (2)
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
#!/bin/make
# Copyright 2005 Paul Martin <pm@debian.org>
#
# 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


# Find out which version of ELinks we've got
# This allows us to build correctly on both sarge and etch
elinks_version = $(shell elinks --version|perl -ne 'if (/^ELinks\s+(\d+\.\d+)/i) {print "$$1\n";}')

ifeq ($(elinks_version),0.9)
elinks_opts = -dump -dump-width 79 -no-numbering 1
else
elinks_opts = -dump -dump-width 79 -no-numbering 1 -no-references 1
endif

all: jargon.txt
.PHONY: all

jargsrc.tar.gz:
	wget http://www.catb.org/~esr/jargon/jargsrc.tar.gz

jargon.xml: jargsrc.tar.gz
	tar xvfz jargsrc.tar.gz jargon.xml

jargon-text.xsl: jargsrc.tar.gz
	tar xvfz jargsrc.tar.gz jargon-text.xsl
	patch -p0 <jargon-text.xsl.patch

jargon.xsl: jargsrc.tar.gz
	tar xvfz jargsrc.tar.gz jargon.xsl
	patch -p0 <jargon.xsl.patch

jargon-web.xml:
	# esr wrote xmlif, but jargon.xml uses the old syntax
	perl -pe 's/<\?(if|else|fi)\b/<?xmlif \1/' <jargon.xml | \
	xmlif condition='web' >jargon-web.xml

jargon-web.html: jargon-web.xml
	# Convert XML to HTML
	xmlto -m jargon-text.xsl html-nochunks jargon-web.xml
	# Change acute accents to apostrophes. iso_8859-15 shows them badly
	sed -i "s/\o264/'/" jargon-web.html

jargon.txt: jargon-web.html
	# Turn into plain text
	elinks $(elinks_opts) jargon-web.html >jargon.txt

clean:
	rm -f jargon-web.xml
	rm -f jargon-web.html
	rm -f jargon.txt
	rm -f jargsrc.tar.gz
	rm -f *~

force-update: superclean jargon.xsl jargon-text.xsl jargon.xml jargsrc.tar.gz
.PHONY: force-update

superclean:
	rm -f jargon.xml
	rm -f jargon-text.xsl
	rm -f jargon.xsl