File: txtdocs.diff

package info (click to toggle)
iproute 20120521-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,968 kB
  • sloc: ansic: 39,902; sh: 1,774; cpp: 476; makefile: 466; yacc: 339; lex: 145; perl: 101
file content (40 lines) | stat: -rw-r--r-- 1,011 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
Origin: author unknown, this was split out from a direct source edit.
Description: Add make rules to build documentation in plain text format.
             The "txt" target needs to be invoked explicitly (not
	     hooked up to "all") and needs lynx installed when used.
Forwarded: no

--- a/doc/Makefile
+++ b/doc/Makefile
@@ -14,6 +14,7 @@
 PAGESPERPAGE=2
 
 HTMLFILES=$(subst .sgml,.html,$(shell echo *.sgml))
+TXTFILES=$(subst .sgml,.txt,$(shell echo *.sgml))
 DVIFILES=$(subst .ps,.dvi,$(PSFILES))
 PDFFILES=$(subst .ps,.pdf,$(PSFILES))
 
@@ -28,6 +29,8 @@
 
 pdf: $(PDFFILES)
 
+txt: $(TXTFILES)
+
 print: $(PSFILES)
 	$(LPR) $(PSFILES)
 
@@ -55,9 +58,13 @@
 %.html: %.sgml
 	$(SGML2HTML) $<
 
+%.txt: %.html
+	lynx -nolist -dump $< > $@
+		
+
 install:
 	install -m 0644 $(shell echo *.tex) $(DESTDIR)$(DOCDIR)
 	install -m 0644 $(shell echo *.sgml) $(DESTDIR)$(DOCDIR)
 
 clean:
-	rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html
+	rm -f *.aux *.log *.toc $(PSFILES) $(DVIFILES) *.html $(TXTFILES)