aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.nmake6
-rw-r--r--config.nmake14
-rw-r--r--help/Makefile.nmake5
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
@@ -44,6 +44,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"
# (sorry ARM, Alpha, MIPS, and Itanium fans).
@@ -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