#!/bin/make # Copyright 2005 Paul Martin # # 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-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