aboutsummaryrefslogtreecommitdiffstats
path: root/tools/runa2x.sh
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-01-06 16:59:32 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-08 22:05:38 +0000
commitcd7408e526df2596b478ab622b90a8a2a60890c2 (patch)
tree21c87caa27168811a7b4858b02e0b0798f5d10d1 /tools/runa2x.sh
parent4b8c66891a830716bf1569b9d6aa6742bc47f81c (diff)
CMake: Enable DocBook on Windows.
Add a wrapper script and CMake macros which lets us run Cygwin's a2x from Windows. Add *another* wrapper script that ignores the return value of hhc.exe. Move the ASCIIDOC2DOCBOOK macro to FindASCIIDOC.cmake. Add FindHHC.cmake. Add hints to FindFOP.cmake. Use unique file names in the HTML Help chain in an attempt to avoid a race condition. To do: - Fix curly quote in HHC title. Change-Id: I9b154b7fbd02703656e2ab380199ec0a6db4e36d Reviewed-on: https://code.wireshark.org/review/6379 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/runa2x.sh')
-rw-r--r--tools/runa2x.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/runa2x.sh b/tools/runa2x.sh
new file mode 100644
index 0000000000..eb0687d1e6
--- /dev/null
+++ b/tools/runa2x.sh
@@ -0,0 +1,50 @@
+#!/bin/sh -xv
+
+#
+# runa2x.sh
+# Wrapper script for running Cygwin's a2x via CMake.
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 2015 Gerald Combs
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# Bugs:
+# - This script shouldn't exist. Unfortunately there doesn't appear
+# to be a way to construct a Windows command line that can set the
+# environment variables below, then run /usr/bin/a2x (which is a symlink).
+
+if [ `uname -o` != "Cygwin" ] ; then
+ >&2 echo "We're trying to limit the scope of this insanity to CMake + Cygwin"
+ exit 1
+fi
+
+LC_ALL=C
+export LC_ALL
+
+TZ=UTC
+export TZ
+
+PATH=/usr/bin
+export PATH
+
+PYTHONHOME=/
+export PYTHONHOME
+
+echo "running a2x with args $@"
+
+a2x "$@"