Support 'auxbindir' for installing sgmlpre and rtf2rtf. Set it to /usr/lib/linuxdoc-tools.

Deal differently with normal programs for general use (linuxdoc, nsgmls)
and programs for internal use like sgmlpre or rtf2rtf, whose installation
dir is now controlled by 'auxbindir'. This is now set to
/usr/lib/linuxdoc-tools instead of /usr/bin and should address #193543.
parent 74f0fb7d
......@@ -7,6 +7,7 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
auxbindir = @auxbindir@
datadir = @datadir@
mandir = @mandir@
PERL = @PERL@
......@@ -89,11 +90,16 @@ ifeq ($(BUILD_ISO_ENTITIES), true)
$(MAKE) install )
endif
# -- Install auxiliary programs
mkdir -p $(auxbindir)
for ii in sgmlpre/sgmlpre rtf-fix/rtf2rtf; do \
bn=`basename $$ii`; \
$(INSTALL_PROGRAM) $$ii $(bindir)/$$bn; \
$(INSTALL_PROGRAM) $$ii $(auxbindir)/$$bn; \
done
$(INSTALL_PROGRAM) bin/linuxdoc $(bindir)/linuxdoc
@echo "Installing library and support files in $(pkgdatadir)..."
if [ ! -d $(pkgdatadir) ]; then mkdir -p $(pkgdatadir); fi
chmod 755 $(pkgdatadir)
......@@ -187,7 +193,7 @@ gen : $(GENFILES)
rm -f $@ 2>/dev/null; cat $< | sed \
-e 's!\@prefix\@!@prefix@!' \
-e 's!\@DATADIR\@!@datadir@/linuxdoc-tools!' \
-e 's!\@BINDIR\@!@bindir@!' \
-e 's!\@auxbindir\@!@auxbindir@!' \
-e 's!\@NSGMLS\@!@NSGMLS@!' \
-e 's!\@SGMLSASP\@!@SGMLSASP@!' \
-e 's!\@GROFF\@!@GROFF@!' \
......
......@@ -16,11 +16,11 @@ sub BEGIN {
use strict;
use vars qw($prefix $DataDir $BinDir $progs);
use vars qw($prefix $DataDir $AuxBinDir $progs);
$prefix = "@prefix@";
$DataDir = "@DATADIR@";
$BinDir = "@BINDIR@";
$prefix = "@prefix@";
$DataDir = "@DATADIR@";
$AuxBinDir = "@auxbindir@";
use lib "@DATADIR@";
use lib "@prefix@/perl5";
......
......@@ -13,6 +13,9 @@ ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-perl-w use perl -w option"
ac_help="$ac_help
--with-auxbindir=dir dir for internal use programs
(default: ${exec_prefix}/bin)"
ac_help="$ac_help
--with-installed-sgmlsasp use installed sgmlsasp"
ac_help="$ac_help
......@@ -561,7 +564,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:565: checking for a BSD compatible install" >&5
echo "configure:568: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -617,7 +620,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:621: checking for $ac_word" >&5
echo "configure:624: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -657,6 +660,7 @@ else
{ echo "configure: error: You don't have Perl 5.004..." 1>&2; exit 1; }
exit 1
fi
# Check whether --with-perl-w or --without-perl-w was given.
if test "${with_perl_w+set}" = set; then
withval="$with_perl_w"
......@@ -667,10 +671,22 @@ else
fi
# Check whether --with-auxbindir or --without-auxbindir was given.
if test "${with_auxbindir+set}" = set; then
withval="$with_auxbindir"
auxbindir="$withval"
else
auxbindir="\${exec_prefix}/bin"
fi
# Extract the first word of "groff", so it can be a program name with args.
set dummy groff; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:674: checking for $ac_word" >&5
echo "configure:690: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GROFF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -706,7 +722,7 @@ fi
echo $ac_n "checking whether ${GROFF} accepts -mgs""... $ac_c" 1>&6
echo "configure:710: checking whether ${GROFF} accepts -mgs" >&5
echo "configure:726: checking whether ${GROFF} accepts -mgs" >&5
if eval "test \"`echo '$''{'ac_cv_linuxdoctools_groff_mgs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -732,7 +748,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:736: checking for $ac_word" >&5
echo "configure:752: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -776,7 +792,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:780: checking for $ac_word" >&5
echo "configure:796: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_NSGMLS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -820,7 +836,7 @@ test -n "$NSGMLS" || NSGMLS="notfound"
# Extract the first word of "sgmlsasp", so it can be a program name with args.
set dummy sgmlsasp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:824: checking for $ac_word" >&5
echo "configure:840: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SGMLSASP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -862,7 +878,7 @@ else
BUILD_SGMLSASP=true
fi
......@@ -1055,6 +1071,7 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@PERL@%$PERL%g
s%@PERLWARN@%$PERLWARN%g
s%@auxbindir@%$auxbindir%g
s%@GROFF@%$GROFF%g
s%@GROFFMACRO@%$GROFFMACRO%g
s%@AWK@%$AWK%g
......@@ -1270,7 +1287,7 @@ if test "$no_recursion" != yes; then
fi
fi
cd $ac_popdir
cd "$ac_popdir"
done
fi
......
......@@ -18,12 +18,23 @@ else
AC_MSG_ERROR(You don't have Perl 5.004...)
exit 1
fi
AC_ARG_WITH(perl-w,
[ --with-perl-w use perl -w option],
[ --with-perl-w use perl -w option],
PERLWARN=-w,
PERLWARN=
)
dnl ------ Set dir for auxiliary programs like sgmlpre -----
AC_ARG_WITH(auxbindir,
[ --with-auxbindir=dir dir for internal use programs]
[ (default: ${exec_prefix}/bin)],
auxbindir="$withval",
auxbindir="\${exec_prefix}/bin"
)
AC_SUBST(PERLWARN)
AC_SUBST(auxbindir)
AC_PATH_PROG(GROFF, groff)
AC_SUBST(GROFF)
......@@ -61,7 +72,7 @@ AC_ARG_WITH(installed-sgmlsasp,
BUILD_SGMLSASP=,
SGMLSASP=\${prefix}/bin/sgmlsasp
BUILD_SGMLSASP=true
)
)
AC_SUBST(SGMLSASP)
AC_SUBST(BUILD_SGMLSASP)
......
......@@ -37,7 +37,8 @@ build-stamp:
PATH=/usr/bin:$(PATH) ./configure \
--prefix=/usr \
--mandir=/$(MANDIR) \
--with-installed-nsgmls
--with-installed-nsgmls \
--with-auxbindir=/usr/lib/linuxdoc-tools
$(MAKE) prefix=/usr mandir=/$(MANDIR) \
PERL=/usr/bin/perl \
......@@ -81,7 +82,7 @@ install: build
perl5libdir=`pwd`/debian/tmp/usr/share/perl5 \
PERL=/usr/bin/perl \
mandir=`pwd`/debian/tmp/usr/share/man \
bindir=`pwd`/debian/tmp/usr/bin \
auxbindir=`pwd`/debian/tmp/usr/lib/linuxdoc-tools \
texdir=`pwd`/debian/tmp/usr/share/texmf/tex/latex/misc \
install
......
......@@ -43,7 +43,7 @@ PERL=`which perl`
sed < ../bin/linuxdoc.in >$TMPDIR/linuxdoc \
-e 's!\@prefix\@!'${PREFIX}'!' \
-e 's!\@BINDIR\@!'${BINDIR}'!' \
-e 's!\@auxbindir\@!'${auxbindir}'!' \
-e 's!\@DATADIR\@!'${TMPDIR}'/linuxdoc-tools!' \
-e 's!\@NSGMLS\@!'${NSGMLS}'!' \
-e 's!\@SGMLSASP\@!'${SGMLSASP}'!' \
......
......@@ -45,7 +45,7 @@ $rtf->{postASP} = sub {
# -------------------------------------------------------------
my $INFILE = shift;
my $PIPE;
my $rtf2rtf = "$main::BinDir/rtf2rtf";
my $rtf2rtf = "$main::AuxBinDir/rtf2rtf";
my $split = "-2" if $rtf->{twosplit};
my $prefile = "$global->{filename}";
my $rtffile = "$global->{filename}.rtf";
......
......@@ -289,7 +289,7 @@ sub init {
$Formats{$global->{NAME}} = $global; # All formats we know.
$FmtList{$global->{NAME}} = $global; # List of formats for help msgs.
$global->{sgmlpre} = "sgmlpre";
$global->{sgmlpre} = "$main::AuxBinDir/sgmlpre";
my $error_header = "LinuxdocTools::init";
if ( -e "/etc/papersize" ){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment