From Edgar Gladkich:
[obnox/wireshark/wip.git] / help / Makefile.am
1 # Makefile.am
2 # Automake file for Wireshark help files
3 #
4 # $Id$
5 #
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 2003 Gerald Combs
9
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
24 #
25 # Install the help files in the "help" subdirectory of the data directory.
26 #
27 helpdir = $(pkgdatadir)/help
28 help_DATA = \
29         toc                     \
30         getting_started.txt     \
31         capturing.txt           \
32         capture_filters.txt     \
33         display_filters.txt     \
34         faq.txt                 \
35         overview.txt
36
37 EXTRA_DIST = \
38         $(help_DATA)            \
39         Makefile.nmake          \
40         $(srcdir)/faq.py        \
41         faq.txt
42
43 CLEANFILES = faq.txt
44
45 MAINTAINERCLEANFILES = \
46         Makefile.in
47
48 # Try our best to convert the FAQ to text.
49 # The output of html2text.py isn't as pretty as elinks, links, or lynx. If that ever changes, we
50 # can use it exclusively.
51 faq.txt: $(srcdir)/faq.py
52         $(srcdir)/faq.py >$@.tmp && \
53         (( which elinks > /dev/null && elinks -dump -dump-width 72 -no-numbering -no-references < $@.tmp > $@ ) || \
54          ( which links  > /dev/null && links -width 72 -html-numbered-links 0 -dump               $@.tmp > $@ ) || \
55          ( which lynx   > /dev/null && lynx -dump -width=72 -nolist -stdin -force-html          < $@.tmp > $@ ) || \
56          $(srcdir)/../tools/html2text.py --width=72 --no-links $@.tmp > $@ ) && \
57         rm -f $@.tmp