From 797969983d38149f4a0ea1f960becfac88fc2b8e Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 19 Feb 2019 18:32:45 +0100 Subject: [PATCH] Doc: Detect SP/OpenSP automatically --- INSTALL | 5 ----- doc/sgml2html | 4 ++++ doc/sgml2latex | 4 ++++ doc/sgml2txt | 4 ++++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/INSTALL b/INSTALL index b9ca3e00..b3f66f13 100644 --- a/INSTALL +++ b/INSTALL @@ -40,8 +40,3 @@ For compiling BIRD documentation you also need: - Linuxdoc-Tools - LaTeX - -Note that build scripts for BIRD documentation expects 'nsgmls' from -James Clark's SP suite, while modern distributions use 'onsgmls' from -OpenSP suite. It is possible to build BIRD documentation with OpenSP -tools, but it requires manually tweaking paths in doc/sgml2* scripts. diff --git a/doc/sgml2html b/doc/sgml2html index 6072a7a3..ea8e8c92 100755 --- a/doc/sgml2html +++ b/doc/sgml2html @@ -34,6 +34,10 @@ $progs = { "GROFFMACRO" => "-ms", "AWK" => "/usr/share/linuxdoc-tools/awkwhich" }; + +if (! -x $progs->{"NSGMLS"}) + { $progs->{"NSGMLS"} = "/usr/bin/onsgmls"; } + $ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog" . (defined $ENV{SGML_CATALOG_FILES} ? ":$ENV{SGML_CATALOG_FILES}" : ""); diff --git a/doc/sgml2latex b/doc/sgml2latex index c48f787d..79c6df03 100755 --- a/doc/sgml2latex +++ b/doc/sgml2latex @@ -34,6 +34,10 @@ $progs = { "GROFFMACRO" => "-ms", "AWK" => "/usr/share/linuxdoc-tools/awkwhich" }; + +if (! -x $progs->{"NSGMLS"}) + { $progs->{"NSGMLS"} = "/usr/bin/onsgmls"; } + $ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog" . (defined $ENV{SGML_CATALOG_FILES} ? ":$ENV{SGML_CATALOG_FILES}" : ""); diff --git a/doc/sgml2txt b/doc/sgml2txt index af0bcb49..013479fe 100755 --- a/doc/sgml2txt +++ b/doc/sgml2txt @@ -34,6 +34,10 @@ $progs = { "GROFFMACRO" => "-ms", "AWK" => "/usr/share/linuxdoc-tools/awkwhich" }; + +if (! -x $progs->{"NSGMLS"}) + { $progs->{"NSGMLS"} = "/usr/bin/onsgmls"; } + $ENV{"SGML_CATALOG_FILES"} = "$DataDir/dtd/catalog" . (defined $ENV{SGML_CATALOG_FILES} ? ":$ENV{SGML_CATALOG_FILES}" : "");