From 1f375a072644acd032a00d8a55df58f03237e8a6 Mon Sep 17 00:00:00 2001 From: gerald Date: Wed, 17 Dec 2008 21:11:20 +0000 Subject: Remove lynx as a dependency on Windows. By default, create the FAQ using html2text.py. You can override this by adjusting config.nmake or by setting HTML2TXT. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27041 f5534014-38df-0310-8fa8-9805f1628bb7 --- Makefile.nmake | 6 +++++- config.nmake | 14 ++++++++++++-- help/Makefile.nmake | 5 ++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Makefile.nmake b/Makefile.nmake index 13cc329bb7..0d0dfef07f 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -644,6 +644,11 @@ doxygen-run: doxygen: doxygen.cfg doxygen-run +help\faq.txt: + cd help + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake faq.txt + cd .. + FAQ: help\faq.txt cp --preserve $? $@ @@ -668,7 +673,6 @@ REQUIRED_TOOLS=\ $(YACC) \ $(LEX) \ env \ - lynx \ grep \ /usr/bin/find \ $(PERL) \ diff --git a/config.nmake b/config.nmake index 648d0e8246..b4684c2471 100644 --- a/config.nmake +++ b/config.nmake @@ -43,6 +43,13 @@ WIRESHARK_LIBS=C:\wireshark-$(PLATFORM)-libs # PROGRAM_FILES=$(PROGRAMFILES) +# +# Location of the "tools" directory. This affects HTML2TXT below and should +# be overridden by makefiles in any subdirectories that use HTML2TXT. +!IFNDEF TOOLS_DIR +TOOLS_DIR=tools +!ENDIF + # # Machine type for the compiler and linker # TARGET_MACHINE (Used for link /MACHINE) should be one of "X86" or "X64" @@ -579,8 +586,11 @@ HHC_EXE="$(HHC_DIR)\hhc.exe" # (cygwin: lynx works, elinks not available, links and true doesn't produce output) #HTML2TXT=elinks -dump -dump-width 72 #HTML2TXT=links -dump -width 72 -HTML2TXT=lynx -dump -width=72 -nolist -stdin -#HTML2TXT="true" +#HTML2TXT=lynx -dump -width=72 -nolist -stdin + +!IFNDEF HTML2TXT +HTML2TXT=$(PYTHON) $(TOOLS_DIR)\html2text.py --width=72 --no-links +!ENDIF # the XSL processor (part of cygwin's libxslt package) XSLTPROC="xsltproc" diff --git a/help/Makefile.nmake b/help/Makefile.nmake index e0c3df6e9f..d8d22178e7 100644 --- a/help/Makefile.nmake +++ b/help/Makefile.nmake @@ -3,12 +3,15 @@ # # $Id$ +TOOLS_DIR=..\tools include ..\config.nmake ############### no need to modify below this line ######### +all: faq.txt + faq.txt: faq.py - $(PYTHON) faq.py | lynx -dump -width=72 -nolist -stdin -force-html > $@ + $(PYTHON) faq.py | $(HTML2TXT) > $@ clean: rm -rf faq.txt -- cgit v1.2.3